This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
The following commit(s) were added to refs/heads/develop by this push:
new 30fc0637c MXMLJSCRoyale, MXMLJSCNative: fix missing compilation units
for resource bundles specified with -include-resource-bundles compiler option
30fc0637c is described below
commit 30fc0637cee9c8793e8f61abb235d910738d3475
Author: Josh Tynjala <[email protected]>
AuthorDate: Wed Jul 29 14:30:50 2026 -0700
MXMLJSCRoyale, MXMLJSCNative: fix missing compilation units for resource
bundles specified with -include-resource-bundles compiler option
---
RELEASE_NOTES.md | 1 +
.../main/java/org/apache/royale/compiler/clients/MXMLJSCNative.java | 6 +++++-
.../main/java/org/apache/royale/compiler/clients/MXMLJSCRoyale.java | 6 +++++-
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index aae42cdcf..21dc79a41 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -88,6 +88,7 @@ Apache Royale Compiler 1.0.0
- compiler: Fixed missing binding data caused by thread conflicts.
- compiler: Fixed lost typing information in method bodies when emitting
JavaScript in some circumstances.
- compiler: Fixed missing symbols specified with `-includes` compiler option
in generated JS.
+- compiler: Fixed missing symbols specified with `-include-resource-bundles`
compiler option in generated JS.
- compiler: Fixed missing "Generated byte code contains an operand stack
underflow" error when warnings are reported without other errors.
- compiler: Fixed null exception when emitting embedded plain text to JS.
- compiler: Fixed operand stack underflow error when using data binding in
MXML to assign to `<fx:Object>` property.
diff --git
a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNative.java
b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNative.java
index b010aa768..dade3f89b 100644
---
a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNative.java
+++
b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCNative.java
@@ -426,6 +426,8 @@ public class MXMLJSCNative implements JSCompilerEntryPoint,
ProblemQueryProvider
roots.add(mainCU);
Set<ICompilationUnit> incs =
target.getIncludesCompilationUnits();
roots.addAll(incs);
+ Collection<ICompilationUnit> incResources =
((JSTarget)target).getIncludedResourceBundlesCompilationUnits(problems.getProblems());
+ roots.addAll(incResources);
project.mixinClassNames = new TreeSet<String>();
List<ICompilationUnit> reachableCompilationUnits =
project.getReachableCompilationUnitsInSWFOrder(roots);
((RoyaleJSTarget)target).collectMixinMetaData(project.mixinClassNames,
reachableCompilationUnits);
@@ -577,7 +579,7 @@ public class MXMLJSCNative implements JSCompilerEntryPoint,
ProblemQueryProvider
{
project.compiledResourceBundleNames.add(bundleName);
}
- project.compiledResourceBundleClasses.add(bundleClassName);
+ project.compiledResourceBundleClasses.add(bundleClassName);
try {
IFileSpecification fileSpecification =
project.getWorkspace().getFileSpecification(cu.getAbsoluteFilename());
resourceBundleFileNode =
parser.parse(cu.getAbsoluteFilename(),cu.getLocale(),fileSpecification.createReader(),
project.getProblems());
@@ -1052,6 +1054,8 @@ public class MXMLJSCNative implements
JSCompilerEntryPoint, ProblemQueryProvider
roots.add(mainCU);
Set<ICompilationUnit> incs = target.getIncludesCompilationUnits();
roots.addAll(incs);
+ Collection<ICompilationUnit> incResources =
((JSTarget)target).getIncludedResourceBundlesCompilationUnits(problems.getProblems());
+ roots.addAll(incResources);
project.mixinClassNames = new TreeSet<String>();
List<ICompilationUnit> units =
project.getReachableCompilationUnitsInSWFOrder(roots);
for (ICompilationUnit unit : units)
diff --git
a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyale.java
b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyale.java
index cfb428077..23ad5e01a 100644
---
a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyale.java
+++
b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSCRoyale.java
@@ -431,6 +431,8 @@ public class MXMLJSCRoyale implements JSCompilerEntryPoint,
ProblemQueryProvider
roots.add(mainCU);
Set<ICompilationUnit> incs =
target.getIncludesCompilationUnits();
roots.addAll(incs);
+ Collection<ICompilationUnit> incResources =
((JSTarget)target).getIncludedResourceBundlesCompilationUnits(problems.getProblems());
+ roots.addAll(incResources);
project.mixinClassNames = new TreeSet<String>();
project.remoteClassAliasMap = new HashMap<String,
String>();
List<ICompilationUnit> reachableCompilationUnits =
project.getReachableCompilationUnitsInSWFOrder(roots);
@@ -822,7 +824,7 @@ public class MXMLJSCRoyale implements JSCompilerEntryPoint,
ProblemQueryProvider
{
project.compiledResourceBundleNames.add(bundleName);
}
- project.compiledResourceBundleClasses.add(bundleClassName);
+ project.compiledResourceBundleClasses.add(bundleClassName);
try {
IFileSpecification fileSpecification =
project.getWorkspace().getFileSpecification(cu.getAbsoluteFilename());
resourceBundleFileNode =
parser.parse(cu.getAbsoluteFilename(),cu.getLocale(),fileSpecification.createReader(),
project.getProblems());
@@ -1299,6 +1301,8 @@ public class MXMLJSCRoyale implements
JSCompilerEntryPoint, ProblemQueryProvider
roots.add(mainCU);
Set<ICompilationUnit> incs = target.getIncludesCompilationUnits();
roots.addAll(incs);
+ Collection<ICompilationUnit> incResources =
((JSTarget)target).getIncludedResourceBundlesCompilationUnits(problems.getProblems());
+ roots.addAll(incResources);
project.mixinClassNames = new TreeSet<String>();
List<ICompilationUnit> units =
project.getReachableCompilationUnitsInSWFOrder(roots);
for (ICompilationUnit unit : units)