You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2020/12/12 02:26:57 UTC
[GitHub] [royale-compiler] SemiConscious opened a new issue #166: XML Literal assignment causes weird behaviour
SemiConscious opened a new issue #166:
URL: https://github.com/apache/royale-compiler/issues/166
Please see this example:
```
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.apache.org/royale/mx"
width="600" height="400" >
<fx:Script>
<![CDATA[
// this works
static public var DefaultPasswordComplexity:XML = new XML('<Test>123</Test>');
// this causes the missing assert function exception
//static public var DefaultPasswordComplexity:XML = <Test>123</Test>;
]]>
</fx:Script>
<mx:Label text="Hello World"/>
</mx:Application>
```
The first form of XML initialisation works, and the program runs as expected.
The second form causes an exception:
```
Uncaught TypeError: org.apache.royale.debugging.assert is not a function
at Object.org.apache.royale.debugging.assertType (assertType.js:25)
at XML.addChildInternal (XML.js:874)
at Function.XML.iterateElement (XML.js:477)
at XML.XML_parseXMLStr (XML.js:743)
at new XML (XML.js:31)
at i2.js:73
```
If you skip this, there are other weird failures, and the program never initialises.
This is happening using the latest nightly build (maven build), on OSX Big Sur, and I am using the bog standard flex config for the build. Here's the log:
```
Using Royale Compiler codebase: /Users/jim.page/Documents/Royale/nightly-mvn/SDKs/js/bin/../..
Using Royale SDK: /Users/jim.page/Documents/Royale/nightly-mvn/SDKs/js/bin/../..
MXMLJSC
+royalelib=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/js/bin/../../frameworks
-sdk-js-lib=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/js/bin/../../frameworks/js/Royale/generated-sources
-source-path
./src/
-compiler.services=src/services-config.xml
-locale=en_US,es_ES
-allow-source-path-overlap=true
-source-path=./src/locale/{locale}
-compiler.fonts.managers=flash.fonts.AFEFontManager
-target-player=32.0.0
-compiler.optimize=false
-define+=config::DEBUG,true
-define+=goog::DEBUG,false
+configname=flex
-compiler.targets=JSRoyale
-library-path+=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/js/libs/royale-typedefs-gcl-0.9.8-SNAPSHOT-typedefs.swc
-library-path+=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/frameworks/libs/Core-0.9.8-SNAPSHOT-js.swc
-library-path+=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/frameworks/libs/Language-0.9.8-SNAPSHOT-js.swc
-library-path+=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/frameworks/libs/HTML-0.9.8-SNAPSHOT-js.swc
-library-path+=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/frameworks/libs/Basic-0.9.8-SNAPSHOT-js.swc
-library-path+=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/frameworks/libs/Collections-0.9.8-SNAPSHOT-js.swc
-library-path+=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/frameworks/libs/Binding-0.9.8-SNAPSHOT-js.swc
-library-path+=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/frameworks/libs/Graphics-0.9.8-SNAPSHOT-js.swc
-library-path+=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/frameworks/libs/MXRoyale-0.9.8-SNAPSHOT-js.swc
-library-path+=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/frameworks/libs/DragDrop-0.9.8-SNAPSHOT-js.swc
-library-path+=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/frameworks/libs/Express-0.9.8-SNAPSHOT-js.swc
-library-path+=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/frameworks/libs/Effects-0.9.8-SNAPSHOT-js.swc
-library-path+=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/frameworks/libs/Formatters-0.9.8-SNAPSHOT-js.swc
-library-path+=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/frameworks/libs/Charts-0.9.8-SNAPSHOT-js.swc
-library-path+=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/frameworks/libs/Network-0.9.8-SNAPSHOT-js.swc
-library-path+=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/frameworks/libs/Reflection-0.9.8-SNAPSHOT-js.swc
-library-path+=/Users/jim.page/Documents/Royale/nightly-mvn/SDKs/frameworks/libs/XML-0.9.8-SNAPSHOT-js.swc
-link-report=./report.xml
-output
bld/index.swf
--
src/i2.mxml
Dec 12, 2020 2:22:20 AM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: /Users/jim.page/Documents/git/flexportal/bin/js-debug/mx/core/UIComponent.js:3357: WARNING - Suspicious code. This code lacks side-effects. Is there a bug?
} else if ((this.mx_core_UIComponent__toolTip == null || this.mx_core_UIComponent__toolTip == "") && this.mx_core_UIComponent__toolTipBead != null) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 12, 2020 2:22:20 AM com.google.javascript.jscomp.LoggerErrorManager printSummary
WARNING: 0 error(s), 2 warning(s), 98.1% typed
The project 'i2' has been successfully compiled and optimized.
48.110014305 seconds
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [royale-compiler] joshtynjala closed issue #166: XML Literal assignment causes weird behaviour
Posted by GitBox <gi...@apache.org>.
joshtynjala closed issue #166:
URL: https://github.com/apache/royale-compiler/issues/166
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@royale.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [royale-compiler] joshtynjala commented on issue #166: XML Literal assignment causes weird behaviour
Posted by GitBox <gi...@apache.org>.
joshtynjala commented on issue #166:
URL: https://github.com/apache/royale-compiler/issues/166#issuecomment-1006816293
Closing because this issue appears to be fixed. Please feel free to comment with details, if there is still a way to reproduce it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@royale.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org