You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2017/04/13 17:44:10 UTC

[39/50] git commit: [flex-falcon] [refs/heads/dual] - make sure impls are in main deps list

make sure impls are in main deps list


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/2bab63de
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/2bab63de
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/2bab63de

Branch: refs/heads/dual
Commit: 2bab63deb151905254060c90f889c95ac11e4a46
Parents: f117240
Author: Alex Harui <ah...@apache.org>
Authored: Wed Mar 29 23:05:28 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Mar 29 23:05:28 2017 -0700

----------------------------------------------------------------------
 .../compiler/internal/graph/GoogDepsWriter.java   | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2bab63de/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
index 8efaf77..c4f841d 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
@@ -156,16 +156,28 @@ public class GoogDepsWriter {
 			// get the list of all units not referenced by other units
 			for (GoogDep gd : depMap.values())
 			{
-				if (gd.className.equals(mainName)) continue;
+				if (gd.className.equals(mainName)) 
+				{
+					for (String d : gd.fileInfo.impls)
+					{
+						if (!restOfDeps.contains(d))
+							restOfDeps.add(d);
+					}
+					continue;
+				}
 				ICompilationUnit unit = requireMap.get(gd.className);
 				if (unit == null)
 				{
-					restOfDeps.add(gd.className);
+					if (!restOfDeps.contains(gd.className))
+						restOfDeps.add(gd.className);
 					continue;
 				}
 				Set<ICompilationUnit> deps = graph.getDirectReverseDependencies(unit, dependencyTypes);
 				if (deps.size() == 0)
-					restOfDeps.add(gd.className);
+				{
+					if (!restOfDeps.contains(gd.className))
+						restOfDeps.add(gd.className);
+				}
 			}
 			mainDeps.append(getDependencies(restOfDeps)).append("]);\n");
 			sb.insert(0, mainDeps);