Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format Document dont work if there Embed for the variable #776

Open
pngdrift opened this issue Oct 10, 2024 · 3 comments
Open

Format Document dont work if there Embed for the variable #776

pngdrift opened this issue Oct 10, 2024 · 3 comments

Comments

@pngdrift
Copy link

Formatting doesn't work if there is an Embed for the any variable

embedformatbug.mp4
@joshtynjala
Copy link
Member

Thanks! I'll take a look.

@joshtynjala
Copy link
Member

I confirm that an exception is being thrown, preventing the formatting from completing.

Error: Unexpected exception 'java.lang.NullPointerException' at java.io.File.<init>:278
        org.apache.royale.utils.FilenameNormalization.normalize:73
        org.apache.royale.compiler.internal.tree.as.EmbedNode.<init>:60
        org.apache.royale.compiler.internal.parsing.as.BaseASParser.storeEmbedDecoration:1430
        org.apache.royale.compiler.internal.parsing.as.BaseASParser.storeVariableDecorations:1394
        org.apache.royale.compiler.internal.parsing.as.ASParser.variableDefinition:1031
        org.apache.royale.compiler.internal.parsing.as.ASParser.definition:832
        org.apache.royale.compiler.internal.parsing.as.ASParser.attributedDefinition:473
        org.apache.royale.compiler.internal.parsing.as.ASParser.directive:236
        org.apache.royale.compiler.internal.parsing.as.ASParser.classOrInterfaceBlock:2926
        org.apache.royale.compiler.internal.parsing.as.ASParser.classDefinition:1539
        org.apache.royale.compiler.internal.parsing.as.ASParser.definition:847
        org.apache.royale.compiler.internal.parsing.as.ASParser.attributedDefinition:473
        org.apache.royale.compiler.internal.parsing.as.ASParser.directive:236
        org.apache.royale.compiler.internal.parsing.as.ASParser.packageContents:2800
        org.apache.royale.compiler.internal.parsing.as.ASParser.packageDirective:686
        org.apache.royale.compiler.internal.parsing.as.ASParser.directive:180
        org.apache.royale.compiler.internal.parsing.as.ASParser.fileLevelDirectives:126
        org.apache.royale.compiler.internal.parsing.as.BaseASParser.file:3098
        org.apache.royale.formatter.ASTokenFormatter.format:133
        org.apache.royale.formatter.FORMATTER.formatASTokens:371
        org.apache.royale.formatter.FORMATTER.formatFileText:313
        org.apache.royale.formatter.FORMATTER.execute:237
        org.apache.royale.formatter.FORMATTER.main:85

@joshtynjala
Copy link
Member

The issue has been fixed in the Apache Royale compiler used for code intelligence in vscode-as3mxml.

apache/royale-compiler@fee4cb1
apache/royale-compiler@2745365

This fix will not be included in vscode-as3mxml until the next version of Apache Royale is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants