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/17 07:41:18 UTC
[royale-compiler] 04/07: only force QName, XML,
XMLList to be not external if they came from playerglobal or
airglobal
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 bdce8a2bec0f994105a723c77da8b049f83bf03f
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Dec 13 17:20:17 2018 -0800
only force QName, XML, XMLList to be not external if they came from playerglobal or airglobal
---
.../internal/projects/RoyaleJSProject.java | 26 +++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleJSProject.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleJSProject.java
index b1d6c62..74039a3 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleJSProject.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleJSProject.java
@@ -18,6 +18,7 @@
*/
package org.apache.royale.compiler.internal.projects;
+import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -301,7 +302,11 @@ public class RoyaleJSProject extends RoyaleProject
try {
qnames = cu.getQualifiedNames();
String qname = qnames.get(0);
- if (qname.equals("QName") || qname.equals("XML") || qname.equals("XMLList"))
+ // if compiling against airglobal/playerglobal, we have to keep QName, XML, XMLList from being seens
+ // as external otherwise theJS implementations won't get added to the output. But if the definitions
+ // come from XML.SWC assume the linkage is right in case these files get excluded from modules
+ if ((cu.getAbsoluteFilename().contains("airglobal") || cu.getAbsoluteFilename().contains("playerglobal")) &&
+ (qname.equals("QName") || qname.equals("XML") || qname.equals("XMLList")))
return false;
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
@@ -537,4 +542,23 @@ public class RoyaleJSProject extends RoyaleProject
return list;
}
+
+ @Override
+ public File getLinkReport(Configuration config) {
+ File f = config.getLinkReport();
+ if (f != null)
+ {
+ String baseName = f.getName();
+ String suffix = "";
+ int c = baseName.indexOf(".");
+ if (c != -1)
+ {
+ suffix = baseName.substring(c);
+ baseName = baseName.substring(0, c);
+ }
+ baseName += "-js" + suffix;
+ f = new File(f.getParentFile(), baseName);
+ }
+ return f;
+ }
}