flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Dove"<gregd...@apache.org>
Subject [FlexJS] Working to fix a compiler bug - problem with the Problems
Date Fri, 03 Mar 2017 05:09:41 GMT
I have been looking into FLEX-35273 [1].

This is a compiler bug where it is possible to do things that don't make sense, like:

	<local:MyInitialView id="view1" />
	<local:MyInitialView id="view2" />

or even this :

	<js:SimpleCSSValuesImpl />

Neither of the above caused compile time errors.

I have a fix for both the above scenarios.

For the first one, I used MXMLDuplicateChildTagProblem which seems 'close enough'

"Child tag '${childTag}' bound to namespace '${childNamespace}' is already specified for element
'${element}'. It will be ignored.";

This renders as :
Child tag 'MyInitialView' bound to namespace '*' is already specified for element 'js:initialView'.
It will be ignored.
   <local:MyInitialView id="view2" />

in the first example above. The text does not feel entirely right, but seems close enough.
"It will be ignored" sounds more like a warning (as opposed to an error/failure), which I
think a) it should not be and b) it is not. 

For the second one, I could not find any relevant 'Problem' class (I may have missed one perhaps?)
So I just made a new one. I don't really know what the rules are here.
These Problems seem to include an error code so I am unclear what to do if I add a new one.
i.e. it is not clear what new error code I should apply (or even if the error code is important
for something).
For now I just added an arbitrary errorCode = 1999 on MXMLBadChildTagPropertyAssignmentProblem.

The new problem renders out to :
In initializer for 'js:initialView', type org.apache.flex.core.SimpleCSSValuesImpl is not
assignable to target type 'org.apache.flex.core.IApplicationView'. 

Alex, you may be able to advise here.... are there any rules I need to follow for the CompilerProblem
classes (in particular, when adding a new class).

Assuming all is well above, I will commit this fix tomorrow. I was also trying to see if I
could figure out how to get checkintests running, but I so far I did not. However the regular
build tests are all fine with the changes I made for this.

1. https://issues.apache.org/jira/browse/FLEX-35273

View raw message