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 db9cd8da2 RoyaleJSTarget:
compiler-jx/src/main/java/org/apache/royale/compiler/internal/targets/RoyaleJSTarget.java
db9cd8da2 is described below
commit db9cd8da2b12eeef4fd0782b89004a8d076d6e55
Author: Josh Tynjala <[email protected]>
AuthorDate: Wed Aug 5 09:36:23 2026 -0700
RoyaleJSTarget:
compiler-jx/src/main/java/org/apache/royale/compiler/internal/targets/RoyaleJSTarget.java
Should have been catching ProblemParsingCSSRuntimeException, similar to
RoyaleAppSWFTarget, when searching the SWCs for defaults.css files
---
RELEASE_NOTES.md | 1 +
.../compiler/internal/targets/RoyaleJSTarget.java | 18 +++++++++++++-----
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 183be0f6d..a9ffcbda7 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -96,6 +96,7 @@ Apache Royale Compiler 1.0.0
- compiler: Fixed dot character in MXML namespace prefixes not being
recognized, like `xmlns:com.example="com.example.*"`.
- compiler: Fixed incorrect duplicate class definition error when using
`Embed` metadata and there are no duplicates.
- compiler: Fixed E4X filter emitted to JS with wrong member access expression
for local, package-level, or file-level variable or function.
+- compiler: Fixed stack trace instead of problems when defaults.css files from
SWCs contain errors.
- debugger: Added missing isolate ID to SWF load and unload events.
- debugger: Fixed debugger targeting the current JDK version instead of the
intended minimum JDK version.
- debugger: Fixed localized messages appearing as unprocessed tokens.
diff --git
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/targets/RoyaleJSTarget.java
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/targets/RoyaleJSTarget.java
index 0fea71df9..32008025e 100644
---
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/targets/RoyaleJSTarget.java
+++
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/targets/RoyaleJSTarget.java
@@ -32,6 +32,7 @@ import org.apache.royale.compiler.common.DependencyType;
import org.apache.royale.compiler.css.ICSSDocument;
import org.apache.royale.compiler.css.ICSSManager;
import org.apache.royale.compiler.definitions.IDefinition;
+import
org.apache.royale.compiler.internal.caches.CSSDocumentCache.ProblemParsingCSSRuntimeException;
import org.apache.royale.compiler.internal.css.semantics.ActivatedStyleSheets;
import
org.apache.royale.compiler.internal.driver.js.royale.JSCSSCompilationSession;
import org.apache.royale.compiler.internal.projects.DependencyGraph;
@@ -192,13 +193,20 @@ public class RoyaleJSTarget extends JSTarget implements
IJSTarget
allCompilationUnitsInTarget.addAll(dependencies);
// Get all activated defaults.css from SWCs.
- final Map<ICSSDocument, File> activatedDefaultCSSList =
- getAllDefaultCSS(cssManager,
allCompilationUnitsInTarget);
- for (final Map.Entry<ICSSDocument, File> entry :
activatedDefaultCSSList.entrySet())
+ try
{
- activatedStyleSheets.addLibraryCSS(entry.getKey(),
entry.getValue().getAbsolutePath());
+ final Map<ICSSDocument, File> activatedDefaultCSSList =
+ getAllDefaultCSS(cssManager,
allCompilationUnitsInTarget);
+ for (final Map.Entry<ICSSDocument, File> entry :
activatedDefaultCSSList.entrySet())
+ {
+ activatedStyleSheets.addLibraryCSS(entry.getKey(),
entry.getValue().getAbsolutePath());
+ }
+
//LoggingProfiler.onDefaultsCSSCollectionChanged(activatedStyleSheets);
+ }
+ catch(ProblemParsingCSSRuntimeException e)
+ {
+ problems.addAll(e.cssParserProblems);
}
-
//LoggingProfiler.onDefaultsCSSCollectionChanged(activatedStyleSheets);
// Get all dependencies introduced by defaults.css from SWCs.
final ImmutableList<IDefinition> definitions =