Commits

Stephen McKamey committed ce0ccaa

fixing transitive dependencies in debug placeholders

Comments (0)

Files changed (1)

merge-builder/src/main/java/org/duelengine/merge/MergeCompactor.java

 		
 		String hashPath = manager.getProcessedPath(path);
 
-		List<String> children = manager.getDependencies(path);
+		List<String> dependencies = manager.getDependencies(path);
 
-		if (children.size() == 1) {
+		if (dependencies.size() == 1) {
 			// if only one child then use source file as the debugPath
-			manager.setProcessedPath(hashPath, manager.getPlaceholderPath(children.get(0)));
+			manager.setProcessedPath(hashPath, manager.getPlaceholderPath(dependencies.get(0)));
 			return;
 		}
 
 		String debugPath = hashPath.substring(0, slash)+"/debug"+hashPath.substring(slash);
 		manager.setProcessedPath(hashPath, debugPath);
 
+		for (String dependency : dependencies) {
+			// in debug placeholders, merge dependencies become child links
+			manager.addChildLink(debugPath, dependency);
+		}
+
 		File target = manager.getTargetFile(hashPath);
 		if (target.exists()) {
 			return;
 			return;
 		}
 
-		generator.build(manager, target, children);
+		generator.build(manager, target, dependencies);
 	}
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.