You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Piotr Zarzycki <pi...@gmail.com> on 2019/08/08 09:20:00 UTC

Minification problem with latest build

Hi Guys,

Yesterday for some reason our application started to failing in release
build. I have spend many hours to figure out where is the point of breakage
but I'm still not sure and what is the code in our app that it causes.
Here is the minified line of code [1]. Exception is saying:

"TypeError: Cannot set property 'If' of undefined"

So there is a variable "tP." which is undefined. Anyone understand for
example why there upper case "If" word?

I'm using build [2]

[1] https://paste.apache.org/l7iez
[2]
http://apacheroyaleci.westus2.cloudapp.azure.com:8080/job/royale-asjs_jsonly/3355/

Thanks,
-- 

Piotr Zarzycki

Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*

Re: Minification problem with latest build

Posted by Josh Tynjala <jo...@bowlerhat.dev>.
Okay, this should be working correctly now.

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>


On Mon, Aug 12, 2019 at 10:36 AM Josh Tynjala <jo...@bowlerhat.dev>
wrote:

> I've determined that when js-dynamic-access-unknown-members is true, a
> fully-qualified name is output differently:
>
> org["apache"]["royale"]["jewel"]["beads"]["models"].FormItemModel
>
> A fully-qualified name should not be considered dynamic access, though, so
> that's a bug. I'll try to get it fixed.
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>
>
> On Fri, Aug 9, 2019 at 3:52 AM Piotr Zarzycki <pi...@gmail.com>
> wrote:
>
>> Hi Guys,
>>
>> Many Thanks for your answers. I figure out what has happened. Following
>> line causes an issue:
>>
>>
>> _strand.getBeadByType(org.apache.royale.jewel.beads.models.FormItemModel)
>> as
>> org.apache.royale.jewel.beads.models.FormItemModel;
>>
>>
>>
>> When I change that to:
>>
>>
>> _strand.getBeadByType(FormItemModel) as FormItemModel;
>>
>>
>>
>> Everything has started to work. Is it compiler's issue ? It sounds to that
>> it should work.
>>
>> Thanks,
>> Piotr
>>
>> czw., 8 sie 2019 o 14:05 Piotr Zarzycki <pi...@gmail.com>
>> napisał(a):
>>
>> > Hi Harbs,
>> >
>> > If I build my code with: -js-dynamic-access-unknown-members=false I'm
>> > getting in that line following code [1] - look into place around: a.
>> > parentNode&&a.parentNode.royale_wrapper.
>> >
>> > Having -js-dynamic-access-unknown-members=false - making an application
>> > work.
>> >
>> > By unminified do you mean to provide debug version of code ?
>> >
>> > [1] https://paste.apache.org/rnmxg
>> >
>> > Thanks,
>> > Piotr
>> >
>> > czw., 8 sie 2019 o 12:03 Harbs <ha...@gmail.com> napisał(a):
>> >
>> >> N('org.apache.royale.events.getTargetWrapper',tP.If)
>> >>
>> >> tP.If is an alias to the package level function getTargetWrapper. My
>> >> guess is that package level functions have an issue.
>> >>
>> >> Presumable, tP is org.apache.royale.events, which only makes sense if
>> >> org.apache.royale.events would have been a class.
>> >>
>> >> What’s the un-minified output?
>> >>
>> >> > On Aug 8, 2019, at 12:20 PM, Piotr Zarzycki <
>> piotrzarzycki21@gmail.com>
>> >> wrote:
>> >> >
>> >> > Hi Guys,
>> >> >
>> >> > Yesterday for some reason our application started to failing in
>> release
>> >> > build. I have spend many hours to figure out where is the point of
>> >> breakage
>> >> > but I'm still not sure and what is the code in our app that it
>> causes.
>> >> > Here is the minified line of code [1]. Exception is saying:
>> >> >
>> >> > "TypeError: Cannot set property 'If' of undefined"
>> >> >
>> >> > So there is a variable "tP." which is undefined. Anyone understand
>> for
>> >> > example why there upper case "If" word?
>> >> >
>> >> > I'm using build [2]
>> >> >
>> >> > [1] https://paste.apache.org/l7iez
>> >> > [2]
>> >> >
>> >>
>> http://apacheroyaleci.westus2.cloudapp.azure.com:8080/job/royale-asjs_jsonly/3355/
>> >> >
>> >> > Thanks,
>> >> > --
>> >> >
>> >> > Piotr Zarzycki
>> >> >
>> >> > Patreon: *https://www.patreon.com/piotrzarzycki
>> >> > <https://www.patreon.com/piotrzarzycki>*
>> >>
>> >>
>> >
>> > --
>> >
>> > Piotr Zarzycki
>> >
>> > Patreon: *https://www.patreon.com/piotrzarzycki
>> > <https://www.patreon.com/piotrzarzycki>*
>> >
>>
>>
>> --
>>
>> Piotr Zarzycki
>>
>> Patreon: *https://www.patreon.com/piotrzarzycki
>> <https://www.patreon.com/piotrzarzycki>*
>>
>

Re: Minification problem with latest build

Posted by Piotr Zarzycki <pi...@gmail.com>.
Thank you Josh! It will be very helpful for future.

pon., 12 sie 2019 o 19:36 Josh Tynjala <jo...@bowlerhat.dev>
napisał(a):

> I've determined that when js-dynamic-access-unknown-members is true, a
> fully-qualified name is output differently:
>
> org["apache"]["royale"]["jewel"]["beads"]["models"].FormItemModel
>
> A fully-qualified name should not be considered dynamic access, though, so
> that's a bug. I'll try to get it fixed.
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>
>
> On Fri, Aug 9, 2019 at 3:52 AM Piotr Zarzycki <pi...@gmail.com>
> wrote:
>
> > Hi Guys,
> >
> > Many Thanks for your answers. I figure out what has happened. Following
> > line causes an issue:
> >
> >
> > _strand.getBeadByType(org.apache.royale.jewel.beads.models.FormItemModel)
> > as
> > org.apache.royale.jewel.beads.models.FormItemModel;
> >
> >
> >
> > When I change that to:
> >
> >
> > _strand.getBeadByType(FormItemModel) as FormItemModel;
> >
> >
> >
> > Everything has started to work. Is it compiler's issue ? It sounds to
> that
> > it should work.
> >
> > Thanks,
> > Piotr
> >
> > czw., 8 sie 2019 o 14:05 Piotr Zarzycki <pi...@gmail.com>
> > napisał(a):
> >
> > > Hi Harbs,
> > >
> > > If I build my code with: -js-dynamic-access-unknown-members=false I'm
> > > getting in that line following code [1] - look into place around: a.
> > > parentNode&&a.parentNode.royale_wrapper.
> > >
> > > Having -js-dynamic-access-unknown-members=false - making an application
> > > work.
> > >
> > > By unminified do you mean to provide debug version of code ?
> > >
> > > [1] https://paste.apache.org/rnmxg
> > >
> > > Thanks,
> > > Piotr
> > >
> > > czw., 8 sie 2019 o 12:03 Harbs <ha...@gmail.com> napisał(a):
> > >
> > >> N('org.apache.royale.events.getTargetWrapper',tP.If)
> > >>
> > >> tP.If is an alias to the package level function getTargetWrapper. My
> > >> guess is that package level functions have an issue.
> > >>
> > >> Presumable, tP is org.apache.royale.events, which only makes sense if
> > >> org.apache.royale.events would have been a class.
> > >>
> > >> What’s the un-minified output?
> > >>
> > >> > On Aug 8, 2019, at 12:20 PM, Piotr Zarzycki <
> > piotrzarzycki21@gmail.com>
> > >> wrote:
> > >> >
> > >> > Hi Guys,
> > >> >
> > >> > Yesterday for some reason our application started to failing in
> > release
> > >> > build. I have spend many hours to figure out where is the point of
> > >> breakage
> > >> > but I'm still not sure and what is the code in our app that it
> causes.
> > >> > Here is the minified line of code [1]. Exception is saying:
> > >> >
> > >> > "TypeError: Cannot set property 'If' of undefined"
> > >> >
> > >> > So there is a variable "tP." which is undefined. Anyone understand
> for
> > >> > example why there upper case "If" word?
> > >> >
> > >> > I'm using build [2]
> > >> >
> > >> > [1] https://paste.apache.org/l7iez
> > >> > [2]
> > >> >
> > >>
> >
> http://apacheroyaleci.westus2.cloudapp.azure.com:8080/job/royale-asjs_jsonly/3355/
> > >> >
> > >> > Thanks,
> > >> > --
> > >> >
> > >> > Piotr Zarzycki
> > >> >
> > >> > Patreon: *https://www.patreon.com/piotrzarzycki
> > >> > <https://www.patreon.com/piotrzarzycki>*
> > >>
> > >>
> > >
> > > --
> > >
> > > Piotr Zarzycki
> > >
> > > Patreon: *https://www.patreon.com/piotrzarzycki
> > > <https://www.patreon.com/piotrzarzycki>*
> > >
> >
> >
> > --
> >
> > Piotr Zarzycki
> >
> > Patreon: *https://www.patreon.com/piotrzarzycki
> > <https://www.patreon.com/piotrzarzycki>*
> >
>


-- 

Piotr Zarzycki

Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*

Re: Minification problem with latest build

Posted by Josh Tynjala <jo...@bowlerhat.dev>.
I've determined that when js-dynamic-access-unknown-members is true, a
fully-qualified name is output differently:

org["apache"]["royale"]["jewel"]["beads"]["models"].FormItemModel

A fully-qualified name should not be considered dynamic access, though, so
that's a bug. I'll try to get it fixed.

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>


On Fri, Aug 9, 2019 at 3:52 AM Piotr Zarzycki <pi...@gmail.com>
wrote:

> Hi Guys,
>
> Many Thanks for your answers. I figure out what has happened. Following
> line causes an issue:
>
>
> _strand.getBeadByType(org.apache.royale.jewel.beads.models.FormItemModel)
> as
> org.apache.royale.jewel.beads.models.FormItemModel;
>
>
>
> When I change that to:
>
>
> _strand.getBeadByType(FormItemModel) as FormItemModel;
>
>
>
> Everything has started to work. Is it compiler's issue ? It sounds to that
> it should work.
>
> Thanks,
> Piotr
>
> czw., 8 sie 2019 o 14:05 Piotr Zarzycki <pi...@gmail.com>
> napisał(a):
>
> > Hi Harbs,
> >
> > If I build my code with: -js-dynamic-access-unknown-members=false I'm
> > getting in that line following code [1] - look into place around: a.
> > parentNode&&a.parentNode.royale_wrapper.
> >
> > Having -js-dynamic-access-unknown-members=false - making an application
> > work.
> >
> > By unminified do you mean to provide debug version of code ?
> >
> > [1] https://paste.apache.org/rnmxg
> >
> > Thanks,
> > Piotr
> >
> > czw., 8 sie 2019 o 12:03 Harbs <ha...@gmail.com> napisał(a):
> >
> >> N('org.apache.royale.events.getTargetWrapper',tP.If)
> >>
> >> tP.If is an alias to the package level function getTargetWrapper. My
> >> guess is that package level functions have an issue.
> >>
> >> Presumable, tP is org.apache.royale.events, which only makes sense if
> >> org.apache.royale.events would have been a class.
> >>
> >> What’s the un-minified output?
> >>
> >> > On Aug 8, 2019, at 12:20 PM, Piotr Zarzycki <
> piotrzarzycki21@gmail.com>
> >> wrote:
> >> >
> >> > Hi Guys,
> >> >
> >> > Yesterday for some reason our application started to failing in
> release
> >> > build. I have spend many hours to figure out where is the point of
> >> breakage
> >> > but I'm still not sure and what is the code in our app that it causes.
> >> > Here is the minified line of code [1]. Exception is saying:
> >> >
> >> > "TypeError: Cannot set property 'If' of undefined"
> >> >
> >> > So there is a variable "tP." which is undefined. Anyone understand for
> >> > example why there upper case "If" word?
> >> >
> >> > I'm using build [2]
> >> >
> >> > [1] https://paste.apache.org/l7iez
> >> > [2]
> >> >
> >>
> http://apacheroyaleci.westus2.cloudapp.azure.com:8080/job/royale-asjs_jsonly/3355/
> >> >
> >> > Thanks,
> >> > --
> >> >
> >> > Piotr Zarzycki
> >> >
> >> > Patreon: *https://www.patreon.com/piotrzarzycki
> >> > <https://www.patreon.com/piotrzarzycki>*
> >>
> >>
> >
> > --
> >
> > Piotr Zarzycki
> >
> > Patreon: *https://www.patreon.com/piotrzarzycki
> > <https://www.patreon.com/piotrzarzycki>*
> >
>
>
> --
>
> Piotr Zarzycki
>
> Patreon: *https://www.patreon.com/piotrzarzycki
> <https://www.patreon.com/piotrzarzycki>*
>

Re: Minification problem with latest build

Posted by Piotr Zarzycki <pi...@gmail.com>.
Hi Guys,

Many Thanks for your answers. I figure out what has happened. Following
line causes an issue:


_strand.getBeadByType(org.apache.royale.jewel.beads.models.FormItemModel) as
org.apache.royale.jewel.beads.models.FormItemModel;



When I change that to:


_strand.getBeadByType(FormItemModel) as FormItemModel;



Everything has started to work. Is it compiler's issue ? It sounds to that
it should work.

Thanks,
Piotr

czw., 8 sie 2019 o 14:05 Piotr Zarzycki <pi...@gmail.com>
napisał(a):

> Hi Harbs,
>
> If I build my code with: -js-dynamic-access-unknown-members=false I'm
> getting in that line following code [1] - look into place around: a.
> parentNode&&a.parentNode.royale_wrapper.
>
> Having -js-dynamic-access-unknown-members=false - making an application
> work.
>
> By unminified do you mean to provide debug version of code ?
>
> [1] https://paste.apache.org/rnmxg
>
> Thanks,
> Piotr
>
> czw., 8 sie 2019 o 12:03 Harbs <ha...@gmail.com> napisał(a):
>
>> N('org.apache.royale.events.getTargetWrapper',tP.If)
>>
>> tP.If is an alias to the package level function getTargetWrapper. My
>> guess is that package level functions have an issue.
>>
>> Presumable, tP is org.apache.royale.events, which only makes sense if
>> org.apache.royale.events would have been a class.
>>
>> What’s the un-minified output?
>>
>> > On Aug 8, 2019, at 12:20 PM, Piotr Zarzycki <pi...@gmail.com>
>> wrote:
>> >
>> > Hi Guys,
>> >
>> > Yesterday for some reason our application started to failing in release
>> > build. I have spend many hours to figure out where is the point of
>> breakage
>> > but I'm still not sure and what is the code in our app that it causes.
>> > Here is the minified line of code [1]. Exception is saying:
>> >
>> > "TypeError: Cannot set property 'If' of undefined"
>> >
>> > So there is a variable "tP." which is undefined. Anyone understand for
>> > example why there upper case "If" word?
>> >
>> > I'm using build [2]
>> >
>> > [1] https://paste.apache.org/l7iez
>> > [2]
>> >
>> http://apacheroyaleci.westus2.cloudapp.azure.com:8080/job/royale-asjs_jsonly/3355/
>> >
>> > Thanks,
>> > --
>> >
>> > Piotr Zarzycki
>> >
>> > Patreon: *https://www.patreon.com/piotrzarzycki
>> > <https://www.patreon.com/piotrzarzycki>*
>>
>>
>
> --
>
> Piotr Zarzycki
>
> Patreon: *https://www.patreon.com/piotrzarzycki
> <https://www.patreon.com/piotrzarzycki>*
>


-- 

Piotr Zarzycki

Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*

Re: Minification problem with latest build

Posted by Piotr Zarzycki <pi...@gmail.com>.
Hi Harbs,

If I build my code with: -js-dynamic-access-unknown-members=false I'm
getting in that line following code [1] - look into place around: a.
parentNode&&a.parentNode.royale_wrapper.

Having -js-dynamic-access-unknown-members=false - making an application
work.

By unminified do you mean to provide debug version of code ?

[1] https://paste.apache.org/rnmxg

Thanks,
Piotr

czw., 8 sie 2019 o 12:03 Harbs <ha...@gmail.com> napisał(a):

> N('org.apache.royale.events.getTargetWrapper',tP.If)
>
> tP.If is an alias to the package level function getTargetWrapper. My guess
> is that package level functions have an issue.
>
> Presumable, tP is org.apache.royale.events, which only makes sense if
> org.apache.royale.events would have been a class.
>
> What’s the un-minified output?
>
> > On Aug 8, 2019, at 12:20 PM, Piotr Zarzycki <pi...@gmail.com>
> wrote:
> >
> > Hi Guys,
> >
> > Yesterday for some reason our application started to failing in release
> > build. I have spend many hours to figure out where is the point of
> breakage
> > but I'm still not sure and what is the code in our app that it causes.
> > Here is the minified line of code [1]. Exception is saying:
> >
> > "TypeError: Cannot set property 'If' of undefined"
> >
> > So there is a variable "tP." which is undefined. Anyone understand for
> > example why there upper case "If" word?
> >
> > I'm using build [2]
> >
> > [1] https://paste.apache.org/l7iez
> > [2]
> >
> http://apacheroyaleci.westus2.cloudapp.azure.com:8080/job/royale-asjs_jsonly/3355/
> >
> > Thanks,
> > --
> >
> > Piotr Zarzycki
> >
> > Patreon: *https://www.patreon.com/piotrzarzycki
> > <https://www.patreon.com/piotrzarzycki>*
>
>

-- 

Piotr Zarzycki

Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*

Re: Minification problem with latest build

Posted by Harbs <ha...@gmail.com>.
N('org.apache.royale.events.getTargetWrapper',tP.If)

tP.If is an alias to the package level function getTargetWrapper. My guess is that package level functions have an issue.

Presumable, tP is org.apache.royale.events, which only makes sense if org.apache.royale.events would have been a class.

What’s the un-minified output?

> On Aug 8, 2019, at 12:20 PM, Piotr Zarzycki <pi...@gmail.com> wrote:
> 
> Hi Guys,
> 
> Yesterday for some reason our application started to failing in release
> build. I have spend many hours to figure out where is the point of breakage
> but I'm still not sure and what is the code in our app that it causes.
> Here is the minified line of code [1]. Exception is saying:
> 
> "TypeError: Cannot set property 'If' of undefined"
> 
> So there is a variable "tP." which is undefined. Anyone understand for
> example why there upper case "If" word?
> 
> I'm using build [2]
> 
> [1] https://paste.apache.org/l7iez
> [2]
> http://apacheroyaleci.westus2.cloudapp.azure.com:8080/job/royale-asjs_jsonly/3355/
> 
> Thanks,
> -- 
> 
> Piotr Zarzycki
> 
> Patreon: *https://www.patreon.com/piotrzarzycki
> <https://www.patreon.com/piotrzarzycki>*


Re: Minification problem with latest build

Posted by Greg Dove <gr...@gmail.com>.
I suggest you double check that your google closure js lib is correctly
unzipped and is not missing parts or has empty folders for some parts. I
had an issue yesterday where I needed to do that manually, but I thought it
was 'just me'
fwiw I think your tP.If might simply be remapped version of:
org.apache.royale.events.getTargetWrapper

...in which case org.apache.royale.events could correspond to tP and is
maybe undefined when it should not be. Not sure... good luck, I will try to
investigate tomorrow local time if you still see issues.


On Thu, 8 Aug 2019, 21:20 Piotr Zarzycki, <pi...@gmail.com> wrote:

> Hi Guys,
>
> Yesterday for some reason our application started to failing in release
> build. I have spend many hours to figure out where is the point of breakage
> but I'm still not sure and what is the code in our app that it causes.
> Here is the minified line of code [1]. Exception is saying:
>
> "TypeError: Cannot set property 'If' of undefined"
>
> So there is a variable "tP." which is undefined. Anyone understand for
> example why there upper case "If" word?
>
> I'm using build [2]
>
> [1] https://paste.apache.org/l7iez
> [2]
>
> http://apacheroyaleci.westus2.cloudapp.azure.com:8080/job/royale-asjs_jsonly/3355/
>
> Thanks,
> --
>
> Piotr Zarzycki
>
> Patreon: *https://www.patreon.com/piotrzarzycki
> <https://www.patreon.com/piotrzarzycki>*
>