Hi Harbs,

so I added your config options to my build and this is the output the compiler 
gives me:

[INFO] --- royale-maven-plugin:0.9.8-SNAPSHOT:compile-js (default-compile-js) @ 
cweb-core-frontend-utils ---
[INFO] Executing COMPC in tool group Royale with args: 
[-load-config=/Users/christofer.dutz/Projects/C-Ware/c-web/core/frontend/utils/target/compile-js-config.xml,
 -source-map=true, -js-output-optimization=skipAsCoercions, 
-js-dynamic-access-unknown-members=true, -allow-private-constructors=true, 
-js-complex-implicit-coercions=false, -js-vector-index-checks=false, 
-compiler.targets=SWF,JSRoyale, -compiler.strict-xml=true]
args:
-load-config=/Users/christofer.dutz/Projects/C-Ware/c-web/core/frontend/utils/target/compile-js-config.xml
-source-map=true
-js-output-optimization=skipAsCoercions
-js-dynamic-access-unknown-members=true
-allow-private-constructors=true
-js-complex-implicit-coercions=false
-js-vector-index-checks=false
-compiler.targets=SWF,JSRoyale
-compiler.strict-xml=true
target:SWF
target:JSRoyale
COMPC
Loading configuration: 
/Users/christofer.dutz/Projects/C-Ware/c-web/core/frontend/utils/target/compile-js-config.xml

/Users/christofer.dutz/Projects/C-Ware/c-web/core/frontend/utils/src/main/royale/de/cware/cweb/server/core/types/Enum.as(29):
 col: 48 Error: Type was not found or was not a compile-time constant: Enum.

    protected function constantOf(name:String):Enum {
                                               ^

/Users/christofer.dutz/Projects/C-Ware/c-web/core/frontend/utils/src/main/royale/de/cware/cweb/server/core/types/Enum.as(32):
 col: 24 Error: Type was not found or was not a compile-time constant: Enum.

            var myenum:Enum = Enum(o);
                       ^

/Users/christofer.dutz/Projects/C-Ware/c-web/core/frontend/utils/src/main/royale/de/cware/cweb/server/core/types/Enum.as(43):
 col: 34 Error: Type was not found or was not a compile-time constant: Enum.

    public function equals(other:Enum):Boolean {
                                 ^

/Users/christofer.dutz/Projects/C-Ware/c-web/core/frontend/utils/src/main/royale/de/cware/cweb/server/core/types/Enum.as(29):
 col: 48 Type was not found or was not a compile-time constant: Enum.

    protected function constantOf(name:String):Enum {
                                               ^

/Users/christofer.dutz/Projects/C-Ware/c-web/core/frontend/utils/src/main/royale/de/cware/cweb/server/core/types/Enum.as(32):
 col: 24 Type was not found or was not a compile-time constant: Enum.

            var myenum:Enum = Enum(o);
                       ^

/Users/christofer.dutz/Projects/C-Ware/c-web/core/frontend/utils/src/main/royale/de/cware/cweb/server/core/types/Enum.as(43):
 col: 34 Type was not found or was not a compile-time constant: Enum.

    public function equals(other:Enum):Boolean {
                                 ^

0.964242339 seconds

Any idea what could be causing this? As soon as I remove the "private" in front 
of the constructor, all is good again.

Chris



Am 14.08.20, 17:59 schrieb "Christofer Dutz" <christofer.d...@c-ware.de>:

    Hi Harbs,

    ok ... I read about the allow-private-constructors switch, but in the blog 
post I read it stated to be on per default.
    But I could definitely give it a try. Thanks.

    And the getQualifiedClassName I had even without the private constructors 
... when enabling the different parts I had the constructors public but even 
then, as soon as I used getQualifiedClassName anywhere, I got the error of not 
finding "Language".

    I've postponed figuring this out but definitely will give your compiler 
switches a try.

    Thanks,

         Chris


    Am 14.08.20, 17:03 schrieb "Harbs" <harbs.li...@gmail.com>:



        > On Aug 14, 2020, at 4:28 PM, Christofer Dutz 
<christofer.d...@c-ware.de> wrote:
        > 
        > 1) Make the private constructors work

        Use -allow-private-constructors=true

        Here is some of the options I have in my asconfigc file (where I’m 
using private constructors):
            "additionalOptions": "-js-output-optimization=skipAsCoercions 
-js-dynamic-access-unknown-members=true -allow-private-constructors=true 
-js-complex-implicit-coercions=false -js-vector-index-checks=false"

        FWIW, I find asconfigc by far the easiest way to define the options for 
building projects.

        > 2) Make the getQualifiedClassName work

        No idea why this is not working for you. I’m definitely using 
getQualifiedClassName, but I don’t know if I used it with private constructors, 
so there might be an issue with that. Maybe resolving #1 will fix #2?


Reply via email to