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 2019/05/31 19:35:32 UTC

[royale-compiler] 02/03: sort other dependencies in alpha order to try to get reproducible binaries

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch release_practice
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit bfa57c3e0ae4f4db369a5af16976521d4deae2cf
Author: Alex Harui <ah...@apache.org>
AuthorDate: Fri May 31 12:34:40 2019 -0700

    sort other dependencies in alpha order to try to get reproducible binaries
---
 .../apache/royale/compiler/internal/targets/Target.java   | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/targets/Target.java b/compiler/src/main/java/org/apache/royale/compiler/internal/targets/Target.java
index c1c36e0..fc0a5e0 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/targets/Target.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/targets/Target.java
@@ -369,7 +369,20 @@ public abstract class Target implements ITarget
                     return Collections.emptySet();
             }
         }
-        return visitedSet;
+        TreeSet<ICompilationUnit> sortedSet = new TreeSet<ICompilationUnit>(new Comparator<ICompilationUnit>()
+        {
+            @Override
+            public int compare(ICompilationUnit o1, ICompilationUnit o2)
+            {
+                return o1.getName().compareTo(o2.getName());
+            }
+        });
+        sortedSet.addAll(visitedSet);
+        System.out.println("visited set");
+        for (ICompilationUnit visited : sortedSet)
+        	System.out.println(visited.getName());
+        System.out.println("end visited set");
+        return sortedSet;
     }
     
     protected DirectDependencies getDirectDependencies(ICompilationUnit cu) throws InterruptedException