You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/12/22 07:08:54 UTC
[royale-compiler] 02/02: repeatable builds
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit ba4bd15032d4592a4cb1e1c9e6cff3844f4e447d
Author: Alex Harui <ah...@apache.org>
AuthorDate: Fri Dec 21 23:08:38 2018 -0800
repeatable builds
---
.../royale/compiler/internal/graph/GoogDepsWriter.java | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java
index 217310c..887bd9d 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/graph/GoogDepsWriter.java
@@ -29,6 +29,7 @@ import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -426,8 +427,6 @@ public class GoogDepsWriter {
if (removeCirculars)
{
- if (current.fileInfo.deps == null)
- return;
unit = requireMap.get(current.className);
if (unit == null)
{
@@ -436,6 +435,8 @@ public class GoogDepsWriter {
requireMap.put(current.className, unit);
requireMap2.put(unit, current.className);
}
+ if (current.fileInfo.deps == null)
+ return;
}
ArrayList<String> impls = current.fileInfo.impls != null ? current.fileInfo.impls : null;
@@ -739,6 +740,7 @@ public class GoogDepsWriter {
String line = JSGoogEmitterTokens.GOOG_REQUIRE.getToken();
line += "('" + dep + "');";
finalLines.add(lastRequireLine++, line);
+ System.out.println("adding require for static dependency " + dep + " to " + className);
}
}
}
@@ -1041,7 +1043,7 @@ public class GoogDepsWriter {
int c = line.indexOf("*/");
if (c > -1 && constructorCount > 0 && constructorCount == numProvides)
{
- return fi;
+ break;
}
else
{
@@ -1166,7 +1168,7 @@ public class GoogDepsWriter {
fi.deps.addAll(Arrays.asList(line.split(",")));
fi.depsLine = i;
}
- else if (fi.depsLine == 0)
+ else /* if (fi.depsLine == 0) */
{
token = JSGoogEmitterTokens.GOOG_REQUIRE.getToken();
c = line.indexOf(token);
@@ -1190,6 +1192,14 @@ public class GoogDepsWriter {
}
}
}
+ if (fi.deps != null)
+ {
+ Collections.sort(fi.deps);
+ }
+ if (fi.staticDeps != null)
+ {
+ Collections.sort(fi.staticDeps);
+ }
return fi;
}