You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jo...@apache.org on 2015/05/27 00:17:00 UTC

[1/3] git commit: [flex-sdk] [refs/heads/develop] - Compiler: fixed an issue where adding a subclass of a Vector's type to the Vector in MXML would result in an internal build error because the subclass didn't get added as a dependency.

Repository: flex-sdk
Updated Branches:
  refs/heads/develop 44eaf8a69 -> fa89e840b


Compiler: fixed an issue where adding a subclass of a Vector's type to the Vector in MXML would result in an internal build error because the subclass didn't get added as a dependency.

Example MXML that causes build error:

<fx:Vector type="mx.core.UIComponent">
	<s:Button/>
</fx:Vector>

I discovered that it would work fine if another Button was added elsewhere in the MXML document, so I figured that somehow the Vector's items weren't checked for dependencies.

Fixed by passing the VectorNode to the same analyze() function used for ArrayNode in the private DependencyAnalyzer class in InterfaceCompiler at the end of the analyze() function for VectorNode. There is no analyze() function for ArrayNode, so I determined that it must fall back to the version with the parameter typed as Node. Originally, the analyze() function for VectorNode only grabbed the Vector's type as a dependency and didn't look at the items added to the Vector.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/ffdb0714
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/ffdb0714
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/ffdb0714

Branch: refs/heads/develop
Commit: ffdb0714ed73bce50a0de079c3144f95aad12bd7
Parents: aac79ae
Author: Josh Tynjala <jo...@apache.org>
Authored: Tue May 26 14:31:50 2015 -0700
Committer: Josh Tynjala <jo...@apache.org>
Committed: Tue May 26 14:31:50 2015 -0700

----------------------------------------------------------------------
 .../src/java/flex2/compiler/mxml/InterfaceCompiler.java         | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/ffdb0714/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
----------------------------------------------------------------------
diff --git a/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java b/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
index 1bf6536..b1dfddd 100644
--- a/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
+++ b/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
@@ -1796,6 +1796,11 @@ public class InterfaceCompiler extends flex2.compiler.AbstractSubCompiler implem
         {
             String className = (String) getLanguageAttributeValue(node, StandardDefs.PROP_TYPE);
             requestType(NameFormatter.toColon(className), node);
+
+            // the items in a Vector may be subclasses of the Vector's type, and
+            // those subclasses may not have been used anywhere else, so we
+            // can't assume that requesting the Vector's type is enough.
+            analyze((Node) node);
         }
 
         public void analyze(DefinitionNode node)


Re: [2/3] git commit: [flex-sdk] [refs/heads/develop] - Compiler: fixed issue where adding an id to a fx:Vector when using -keep compiler argument would result in a compiler error because the wrong class was imported in the generated code for the bindable p

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> Also, a reference to the corresponding commit (ex. Commit:
> http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/ab273645) in the
> JIRA ticket as a comment when closing the ticket would be great as well.


Or alternatively mention the JIRA ticket when committing, that automatically links up the changes with JIRA.

Thanks,
Justin

Re: [2/3] git commit: [flex-sdk] [refs/heads/develop] - Compiler: fixed issue where adding an id to a fx:Vector when using -keep compiler argument would result in a compiler error because the wrong class was imported in the generated code for the bindable p

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Tue, May 26, 2015 at 4:14 PM, Josh Tynjala <jo...@gmail.com> wrote:

> I found these bugs while working on the Feathers SDK (it's my fork of the
> Apache Flex SDK for Feathers and Starling), and I figured that I'd push the
> fixes upstream since they reproduce with Apache Flex too.
>
> Should I create JIRAs with the appropriate details and then close them as
> fixed?
>

Yes, please.  This makes things so much more easier during release time.
Also, a reference to the corresponding commit (ex. Commit:
http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/ab273645) in the
JIRA ticket as a comment when closing the ticket would be great as well.

Thanks,
Om


>
> - Josh
>
> On Tue, May 26, 2015 at 4:05 PM, Justin Mclean <ju...@me.com>
> wrote:
>
> > Hi,
> >
> > Thanks for the fixes. Were JIRAs raised for these or do they relate to a
> > raised JIRA? The release notes are generally built up from information in
> > JIRA so it good to have it documented there.
> >
> > Thanks,
> > Justin
> >
> > > On 27 May 2015, at 8:17 am, joshtynjala@apache.org wrote:
> > >
> > > Compiler: fixed issue where adding an id to a fx:Vector when using
> -keep
> > compiler argument would result in a compiler error because the wrong
> class
> > was imported in the generated code for the bindable property.
> > >
> > > getMultiName() in flex2.compiler.as3.binding.Info wasn't treating
> > __AS3__.vec.Vector.<T> the same as __AS3__.vec:Vector.<T>, causing it to
> > return the wrong namespace and class name.
> > >
> > >
> > > Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
> > > Commit:
> http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/ab273645
> > > Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/ab273645
> > > Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/ab273645
> > >
> > > Branch: refs/heads/develop
> > > Commit: ab27364581abb4476132ef2b1cdbcb90d2514331
> > > Parents: ffdb071
> > > Author: Josh Tynjala <jo...@apache.org>
> > > Authored: Tue May 26 15:14:53 2015 -0700
> > > Committer: Josh Tynjala <jo...@apache.org>
> > > Committed: Tue May 26 15:14:53 2015 -0700
> > >
> > > ----------------------------------------------------------------------
> > > .../src/java/flex2/compiler/as3/binding/Info.java        | 11
> ++++++++++-
> > > 1 file changed, 10 insertions(+), 1 deletion(-)
> > > ----------------------------------------------------------------------
> > >
> > >
> > >
> >
> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/ab273645/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java
> > > ----------------------------------------------------------------------
> > > diff --git
> > a/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java
> > b/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java
> > > index 73ccbdd..f8b4fac 100644
> > > --- a/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java
> > > +++ b/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java
> > > @@ -262,7 +262,16 @@ abstract class Info
> > >
> > >         if (lastIndex < 0)
> > >         {
> > > -            lastIndex = name.lastIndexOf(".");
> > > +            // check for __AS3__.vec.Vector.<T>
> > > +            int dotLessThanIndex = name.lastIndexOf(".<");
> > > +            if (dotLessThanIndex != -1)
> > > +            {
> > > +                lastIndex = name.lastIndexOf(".", dotLessThanIndex -
> 1);
> > > +            }
> > > +            else
> > > +            {
> > > +                lastIndex = name.lastIndexOf(".");
> > > +            }
> > >         }
> > >
> > >         if (lastIndex > 0)
> > >
> >
> >
>

Re: [2/3] git commit: [flex-sdk] [refs/heads/develop] - Compiler: fixed issue where adding an id to a fx:Vector when using -keep compiler argument would result in a compiler error because the wrong class was imported in the generated code for the bindable p

Posted by Josh Tynjala <jo...@gmail.com>.
I found these bugs while working on the Feathers SDK (it's my fork of the
Apache Flex SDK for Feathers and Starling), and I figured that I'd push the
fixes upstream since they reproduce with Apache Flex too.

Should I create JIRAs with the appropriate details and then close them as
fixed?

- Josh

On Tue, May 26, 2015 at 4:05 PM, Justin Mclean <ju...@me.com> wrote:

> Hi,
>
> Thanks for the fixes. Were JIRAs raised for these or do they relate to a
> raised JIRA? The release notes are generally built up from information in
> JIRA so it good to have it documented there.
>
> Thanks,
> Justin
>
> > On 27 May 2015, at 8:17 am, joshtynjala@apache.org wrote:
> >
> > Compiler: fixed issue where adding an id to a fx:Vector when using -keep
> compiler argument would result in a compiler error because the wrong class
> was imported in the generated code for the bindable property.
> >
> > getMultiName() in flex2.compiler.as3.binding.Info wasn't treating
> __AS3__.vec.Vector.<T> the same as __AS3__.vec:Vector.<T>, causing it to
> return the wrong namespace and class name.
> >
> >
> > Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
> > Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/ab273645
> > Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/ab273645
> > Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/ab273645
> >
> > Branch: refs/heads/develop
> > Commit: ab27364581abb4476132ef2b1cdbcb90d2514331
> > Parents: ffdb071
> > Author: Josh Tynjala <jo...@apache.org>
> > Authored: Tue May 26 15:14:53 2015 -0700
> > Committer: Josh Tynjala <jo...@apache.org>
> > Committed: Tue May 26 15:14:53 2015 -0700
> >
> > ----------------------------------------------------------------------
> > .../src/java/flex2/compiler/as3/binding/Info.java        | 11 ++++++++++-
> > 1 file changed, 10 insertions(+), 1 deletion(-)
> > ----------------------------------------------------------------------
> >
> >
> >
> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/ab273645/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java
> > ----------------------------------------------------------------------
> > diff --git
> a/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java
> b/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java
> > index 73ccbdd..f8b4fac 100644
> > --- a/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java
> > +++ b/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java
> > @@ -262,7 +262,16 @@ abstract class Info
> >
> >         if (lastIndex < 0)
> >         {
> > -            lastIndex = name.lastIndexOf(".");
> > +            // check for __AS3__.vec.Vector.<T>
> > +            int dotLessThanIndex = name.lastIndexOf(".<");
> > +            if (dotLessThanIndex != -1)
> > +            {
> > +                lastIndex = name.lastIndexOf(".", dotLessThanIndex - 1);
> > +            }
> > +            else
> > +            {
> > +                lastIndex = name.lastIndexOf(".");
> > +            }
> >         }
> >
> >         if (lastIndex > 0)
> >
>
>

Re: [2/3] git commit: [flex-sdk] [refs/heads/develop] - Compiler: fixed issue where adding an id to a fx:Vector when using -keep compiler argument would result in a compiler error because the wrong class was imported in the generated code for the bindable p

Posted by Justin Mclean <ju...@me.com>.
Hi,

Thanks for the fixes. Were JIRAs raised for these or do they relate to a raised JIRA? The release notes are generally built up from information in JIRA so it good to have it documented there.

Thanks,
Justin

> On 27 May 2015, at 8:17 am, joshtynjala@apache.org wrote:
> 
> Compiler: fixed issue where adding an id to a fx:Vector when using -keep compiler argument would result in a compiler error because the wrong class was imported in the generated code for the bindable property.
> 
> getMultiName() in flex2.compiler.as3.binding.Info wasn't treating __AS3__.vec.Vector.<T> the same as __AS3__.vec:Vector.<T>, causing it to return the wrong namespace and class name.
> 
> 
> Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
> Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/ab273645
> Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/ab273645
> Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/ab273645
> 
> Branch: refs/heads/develop
> Commit: ab27364581abb4476132ef2b1cdbcb90d2514331
> Parents: ffdb071
> Author: Josh Tynjala <jo...@apache.org>
> Authored: Tue May 26 15:14:53 2015 -0700
> Committer: Josh Tynjala <jo...@apache.org>
> Committed: Tue May 26 15:14:53 2015 -0700
> 
> ----------------------------------------------------------------------
> .../src/java/flex2/compiler/as3/binding/Info.java        | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
> ----------------------------------------------------------------------
> 
> 
> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/ab273645/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java
> ----------------------------------------------------------------------
> diff --git a/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java b/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java
> index 73ccbdd..f8b4fac 100644
> --- a/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java
> +++ b/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java
> @@ -262,7 +262,16 @@ abstract class Info
> 
>         if (lastIndex < 0)
>         {
> -            lastIndex = name.lastIndexOf(".");
> +            // check for __AS3__.vec.Vector.<T>
> +            int dotLessThanIndex = name.lastIndexOf(".<");
> +            if (dotLessThanIndex != -1)
> +            {
> +                lastIndex = name.lastIndexOf(".", dotLessThanIndex - 1);
> +            }
> +            else
> +            {
> +                lastIndex = name.lastIndexOf(".");
> +            }
>         }
> 
>         if (lastIndex > 0)
> 


[2/3] git commit: [flex-sdk] [refs/heads/develop] - Compiler: fixed issue where adding an id to a fx:Vector when using -keep compiler argument would result in a compiler error because the wrong class was imported in the generated code for the bindable p

Posted by jo...@apache.org.
 Compiler: fixed issue where adding an id to a fx:Vector when using -keep compiler argument would result in a compiler error because the wrong class was imported in the generated code for the bindable property.

 getMultiName() in flex2.compiler.as3.binding.Info wasn't treating __AS3__.vec.Vector.<T> the same as __AS3__.vec:Vector.<T>, causing it to return the wrong namespace and class name.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/ab273645
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/ab273645
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/ab273645

Branch: refs/heads/develop
Commit: ab27364581abb4476132ef2b1cdbcb90d2514331
Parents: ffdb071
Author: Josh Tynjala <jo...@apache.org>
Authored: Tue May 26 15:14:53 2015 -0700
Committer: Josh Tynjala <jo...@apache.org>
Committed: Tue May 26 15:14:53 2015 -0700

----------------------------------------------------------------------
 .../src/java/flex2/compiler/as3/binding/Info.java        | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/ab273645/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java
----------------------------------------------------------------------
diff --git a/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java b/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java
index 73ccbdd..f8b4fac 100644
--- a/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java
+++ b/modules/compiler/src/java/flex2/compiler/as3/binding/Info.java
@@ -262,7 +262,16 @@ abstract class Info
 
         if (lastIndex < 0)
         {
-            lastIndex = name.lastIndexOf(".");
+            // check for __AS3__.vec.Vector.<T>
+            int dotLessThanIndex = name.lastIndexOf(".<");
+            if (dotLessThanIndex != -1)
+            {
+                lastIndex = name.lastIndexOf(".", dotLessThanIndex - 1);
+            }
+            else
+            {
+                lastIndex = name.lastIndexOf(".");
+            }
         }
 
         if (lastIndex > 0)


[3/3] git commit: [flex-sdk] [refs/heads/develop] - Merge remote-tracking branch 'origin/develop' into develop

Posted by jo...@apache.org.
Merge remote-tracking branch 'origin/develop' into develop


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/fa89e840
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/fa89e840
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/fa89e840

Branch: refs/heads/develop
Commit: fa89e840b36a85485e01765e81d8fc6621f8b7b4
Parents: ab27364 44eaf8a
Author: Josh Tynjala <jo...@apache.org>
Authored: Tue May 26 15:16:43 2015 -0700
Committer: Josh Tynjala <jo...@apache.org>
Committed: Tue May 26 15:16:43 2015 -0700

----------------------------------------------------------------------
 GIT-TEST.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------