Send the "suspect list", and print the suspect versions
This commit is contained in:
parent
6ca37a60b7
commit
2a064ffdc7
3 changed files with 13 additions and 5 deletions
|
@ -39,7 +39,7 @@ public class GuiSortingProblem extends GuiScreen {
|
|||
for (ModContainer mc : failedList.getVisitedNodes())
|
||||
{
|
||||
offset+=10;
|
||||
this.func_73732_a(this.field_73886_k, String.format("%s", mc.toString()), this.field_73880_f / 2, offset, 0xEEEEEE);
|
||||
this.func_73732_a(this.field_73886_k, String.format("%s : before: %s, after: %s", mc.toString(), mc.getDependants(), mc.getDependencies()), this.field_73880_f / 2, offset, 0xEEEEEE);
|
||||
}
|
||||
offset+=20;
|
||||
this.func_73732_a(this.field_73886_k, "The file 'ForgeModLoader-client-0.log' contains more information", this.field_73880_f / 2, offset, 0xFFFFFF);
|
||||
|
|
|
@ -66,6 +66,7 @@ import cpw.mods.fml.common.modloader.BaseModProxy;
|
|||
import cpw.mods.fml.common.registry.GameData;
|
||||
import cpw.mods.fml.common.toposort.ModSorter;
|
||||
import cpw.mods.fml.common.toposort.ModSortingException;
|
||||
import cpw.mods.fml.common.toposort.ModSortingException.SortingExceptionData;
|
||||
import cpw.mods.fml.common.toposort.TopologicalSort;
|
||||
import cpw.mods.fml.common.versioning.ArtifactVersion;
|
||||
import cpw.mods.fml.common.versioning.VersionParser;
|
||||
|
@ -269,8 +270,13 @@ public class Loader
|
|||
catch (ModSortingException sortException)
|
||||
{
|
||||
FMLLog.severe("A dependency cycle was detected in the input mod set so an ordering cannot be determined");
|
||||
FMLLog.severe("The suspect mod list is %s", sortException.getExceptionData().getVisitedNodes());
|
||||
FMLLog.severe("The first mod in the cycle is %s", sortException.getExceptionData().getFirstBadNode());
|
||||
SortingExceptionData<ModContainer> exceptionData = sortException.getExceptionData();
|
||||
FMLLog.severe("The first mod in the cycle is %s", exceptionData.getFirstBadNode());
|
||||
FMLLog.severe("The mod cycle involves");
|
||||
for (ModContainer mc : exceptionData.getVisitedNodes())
|
||||
{
|
||||
FMLLog.severe("%s : before: %s, after: %s", mc.toString(), mc.getDependants(), mc.getDependencies());
|
||||
}
|
||||
FMLLog.log(Level.SEVERE, sortException, "The full error");
|
||||
throw sortException;
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ import java.util.SortedSet;
|
|||
import java.util.TreeSet;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.common.collect.Sets.SetView;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
|
||||
|
@ -183,8 +184,9 @@ public class TopologicalSort
|
|||
FMLLog.severe("Current sorted list : %s", sortedResult);
|
||||
FMLLog.severe("Visited set for this node : %s", visitedNodes);
|
||||
FMLLog.severe("Explored node set : %s", expandedNodes);
|
||||
FMLLog.severe("Likely cycle is in : %s", Sets.difference(visitedNodes, expandedNodes));
|
||||
throw new ModSortingException("There was a cycle detected in the input graph, sorting is not possible", node, visitedNodes);
|
||||
SetView<T> cycleList = Sets.difference(visitedNodes, expandedNodes);
|
||||
FMLLog.severe("Likely cycle is in : %s", cycleList);
|
||||
throw new ModSortingException("There was a cycle detected in the input graph, sorting is not possible", node, cycleList);
|
||||
}
|
||||
|
||||
// Visit this node
|
||||
|
|
Loading…
Reference in a new issue