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/06/26 15:44:47 UTC

[07/50] git commit: [flex-falcon] [refs/heads/master] - FLEX-35300 don't look for js files for external classes

FLEX-35300 don't look for js files for external classes


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

Branch: refs/heads/master
Commit: 37128e83d5c00e93d0b04e5b36c7ce949c573a87
Parents: 8dd7f9c
Author: Alex Harui <ah...@apache.org>
Authored: Mon May 1 17:23:33 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Mon May 1 17:23:33 2017 -0700

----------------------------------------------------------------------
 .../flex/compiler/internal/graph/GoogDepsWriter.java    | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/37128e83/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 b26b632..afc8d00 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
@@ -47,6 +47,7 @@ import org.apache.flex.compiler.internal.driver.js.goog.JSGoogConfiguration;
 import org.apache.flex.compiler.internal.projects.CompilerProject;
 import org.apache.flex.compiler.internal.projects.DefinitionPriority;
 import org.apache.flex.compiler.internal.projects.DependencyGraph;
+import org.apache.flex.compiler.internal.projects.FlexJSProject;
 import org.apache.flex.compiler.problems.FileNotFoundProblem;
 import org.apache.flex.compiler.units.ICompilationUnit;
 import org.apache.flex.swc.ISWC;
@@ -354,7 +355,7 @@ public class GoogDepsWriter {
 	
 	private void addDeps(String className)
 	{
-		if (depMap.containsKey(className) || isGoogClass(className))
+		if (depMap.containsKey(className) || isGoogClass(className) || isExternal(className))
 			return;
 		
 		// build goog dependency list
@@ -919,6 +920,15 @@ public class GoogDepsWriter {
 		path = path.replace('\\', '/');
 		return path;
 	}
+	
+	boolean isExternal(String className)
+	{
+		ICompilationUnit cu = project.resolveQNameToCompilationUnit(className);
+		if (cu == null) return false; // unit testing
+		
+		return ((FlexJSProject)project).isExternalLinkage(cu);
+	}
+	
 	private class GoogDep
 	{
 		public String filePath;