Re: [FlexJS][VS Code] dual issues

2017-07-07 Thread Alex Harui
Don't know.  Right now, you can set up an FB project with the "JS" SWCs
and not see Flash APIs in the intelligence.  But I'm not clear that FB
allows for any switches/options in how it gets the data for code
intelligence.  I think Josh is saying he might use the first target.  I
will see if that works for FB if/when I get around to actually doing this.

-Alex

On 7/7/17, 1:04 AM, "piotrz" <piotrzarzyck...@gmail.com> wrote:

>Alex,
>
>Do you mean by teaching compiler that if I use -target=JSFlex - I will not
>see flash api hints in intellisence ?
>
>Thanks,
>Piotr
>
>
>
>-
>Apache Flex PMC
>piotrzarzyck...@gmail.com
>--
>View this message in context:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-development.247.n4.nabble.com%2FFlexJS-VS-Code-dual-issues-tp62894p6
>2929.html=02%7C01%7C%7C0e8aa1a17ecd4ca28add08d4c511556b%7Cfa7b1b5a7b3
>4438794aed2c178decee1%7C0%7C0%7C636350125614586979=z9APgkfyPFqzQagcK
>1%2FAWeV94WOsljZJcIl6qgC74k0%3D=0
>Sent from the Apache Flex Development mailing list archive at Nabble.com.



Re: [FlexJS][VS Code] dual issues

2017-07-07 Thread Harbs
Sounds great! Looking forward!

Harbs

> On Jul 7, 2017, at 2:12 AM, Josh Tynjala  wrote:
> 
> Okay, I figured out how to make VSCode switch to JS APIs instead of SWF
> APIs for completion and things. In the next version of the extension, when
> the targets compiler option is specified in asconfig.json, and the first
> value isn't "SWF", the extension will offer JS APIs. That includes giving
> you access to native browser APIs instead of Flash Player APIs. That's
> going to be a really nice change, I think. Thanks for pointing out this
> issue!
> 
> - Josh
> 
> On Thu, Jul 6, 2017 at 2:35 PM, Josh Tynjala  wrote:
> 
>>> The js-output-type, library-path and external-library-path options are
>> probably not needed
>> 
>> I would get rid of -js-output-type. I assume that -targets takes
>> precedence, but just to be safe, you shouldn't use both. -js-output-type is
>> necessary for 0.7.0, but switch entirely to -targets with 0.8.0.
>> 
>>> It would be nice to have full support for the new compiler options
>> 
>> html-template, html-output-filename, js-compiler-option,
>> js-external-library-path, js-library-path, swf-external-library-path,
>> swf-library-path, and remove-circulars should all work in the
>> compilerOptions field if you're using the latest vscode-nextgenas 0.4.4 and
>> asconfigc 0.5.1. I just updated asconfigc to support these options last
>> week, and I haven't made an official announcement yet, so you might have
>> missed that one.
>> 
>> I think there may be one or two you'll still need to put into
>> additionalOptions, but you should be able to switch over most of them.
>> 
>>> 1. I’m getting “problems” even for files which are not used in my
>> project and are not open.
>> 
>> This is something I'm aware of in VSCode. The compiler seems to greedily
>> load everything that exists in a source path, even if you don't actually
>> use it. Personally I like this, but even if I were to make it an option
>> somehow, I'm not aware of a way to stop the compiler from working that way
>> either.
>> 
>>> 2. I’m getting lots of errors which are specific to SWF-only output:
>> 
>> I just glanced through the part of VSCode that passes options to the
>> compiler for code intelligence (different from the way that asconfigc runs
>> the compiler to build), and I don't think I'm actually using the value of
>> -targets. It's probably defaulting to SWF. I'll play around with that to
>> see if I can improve things when -targets is specifically JSFlex.
>> 
>>>  a. I’m not getting JS specific classes recognized.
>> 
>> Just to be clear, are you referring to DOM classes like HTMLButtonElement
>> and other browser APIs here? I just want to be sure so that I test the
>> right thing when I make changes.
>> 
>> - Josh
>> 
>> On Thu, Jul 6, 2017 at 2:16 PM, Harbs  wrote:
>> 
>>> Since updating to “dual”has been reporting lots of errors. When I build,
>>> both the debug and release builds build correctly, but the PROBLEMS window
>>> and the live code hinting report lots of (non) issues. I’m not sure what
>>> the source of the errors are, but here are the details:
>>> 
>>> I’ve tried a few variations of the asconfig file, but here’s what I
>>> currently have:
>>> {
>>>"config": "flex",
>>>"compilerOptions": {
>>>"debug": true,
>>>"js-output-type": "flexjs",
>>>"targets": ["JSFlex"],
>>>"source-map": false,
>>>"library-path": [
>>>"lib"
>>>],
>>>"external-library-path": [
>>>"typedefs"
>>>]
>>>},
>>>"copySourcePathAssets": true,
>>>"additionalOptions": "-remove-circulars 
>>> -js-output-optimization=skipAsCoercions
>>> -html-template=src/resources/mdl-js-index-template.html
>>> -js-external-library-path+=typedefs -js-library-path+=lib",
>>>"files":
>>>[
>>>"src/PortedPrintUI.mxml"
>>>]
>>> }
>>> 
>>> The js-output-type, library-path and external-library-path options are
>>> probably not needed, but they don’t seem to adversely effect the builds.
>>> (It would be nice to have full support for the new compiler options.)
>>> 
>>> Problems:
>>> 1. I’m getting “problems” even for files which are not used in my project
>>> and are not open.
>>> 2. I’m getting lots of errors which are specific to SWF-only output:
>>>  a. I’m not getting JS specific classes recognized.
>>>  b. I’m getting lots of incompatible overrides (to Flash methods)
>>>  c. I’m getting overriding function not marked for override errors on
>>> functions that are implemented in flash (i.e. public function get
>>> scaleX():Number)
>>>  d. conflicts between variables and Flash getters.
>>>  e. etc...
>>> 
>>> Thanks,
>>> Harbs
>> 
>> 
>> 



Re: [FlexJS][VS Code] dual issues

2017-07-07 Thread piotrz
Alex,

Do you mean by teaching compiler that if I use -target=JSFlex - I will not
see flash api hints in intellisence ?

Thanks,
Piotr



-
Apache Flex PMC
piotrzarzyck...@gmail.com
--
View this message in context: 
http://apache-flex-development.247.n4.nabble.com/FlexJS-VS-Code-dual-issues-tp62894p62929.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: [FlexJS][VS Code] dual issues

2017-07-06 Thread Josh Tynjala
The AS/MXML code intelligence in VSCode instantiates certain classes from
the compiler to get the data it needs. Previously, I was instantiating a
FlexProject no matter which targets were specified. Now, I instantiate a
FlexJSProject when I'm sure that JS should have a higher priority than SWF
(based on the value of -targets). This seems to be enough to get the
compiler to switch from Flash Player APIs to JS APIs in the data that it
provides, and i can see that it switches COMPILE::JS to true and COMPILE::
SWF to false.

With this change that I just made, I suspect that if we merged the pairs of
SWCs into one, VSCode might just work with no changes (except to tell it to
use the newer compiler).

- Josh


On Jul 6, 2017 4:23 PM, "Alex Harui"  wrote:

I agree, it will be great to get JS API code-intelligence.

Just out of curiosity, what did you have to change?  One work item for the
future is to merge the "JS" SWC into the "SWF" SWC so there is only one
SWC per library instead of the current pair like Core.SWC and CoreJS.swc.
I'm trying to assess the impact of doing so.  We can certainly teach the
compiler to pick different classes based on the current -target, but right
now for FB, all it knows is that one set of SWCs or the other is on the
library path.  If we merge the SWCS, there is no other way to tell the
compiler which APIs to use by default, and I'm not sure I can control that
from outside FB.

Maybe just the Maven artifacts will be merged and we'll keep the pairs of
SWCs for IDEs.

Thoughts?
-Alex

On 7/6/17, 4:12 PM, "Josh Tynjala"  wrote:

>Okay, I figured out how to make VSCode switch to JS APIs instead of SWF
>APIs for completion and things. In the next version of the extension, when
>the targets compiler option is specified in asconfig.json, and the first
>value isn't "SWF", the extension will offer JS APIs. That includes giving
>you access to native browser APIs instead of Flash Player APIs. That's
>going to be a really nice change, I think. Thanks for pointing out this
>issue!
>
>- Josh
>
>On Thu, Jul 6, 2017 at 2:35 PM, Josh Tynjala 
>wrote:
>
>> > The js-output-type, library-path and external-library-path options are
>> probably not needed
>>
>> I would get rid of -js-output-type. I assume that -targets takes
>> precedence, but just to be safe, you shouldn't use both.
>>-js-output-type is
>> necessary for 0.7.0, but switch entirely to -targets with 0.8.0.
>>
>> > It would be nice to have full support for the new compiler options
>>
>> html-template, html-output-filename, js-compiler-option,
>> js-external-library-path, js-library-path, swf-external-library-path,
>> swf-library-path, and remove-circulars should all work in the
>> compilerOptions field if you're using the latest vscode-nextgenas 0.4.4
>>and
>> asconfigc 0.5.1. I just updated asconfigc to support these options last
>> week, and I haven't made an official announcement yet, so you might have
>> missed that one.
>>
>> I think there may be one or two you'll still need to put into
>> additionalOptions, but you should be able to switch over most of them.
>>
>> > 1. I’m getting “problems” even for files which are not used in my
>> project and are not open.
>>
>> This is something I'm aware of in VSCode. The compiler seems to greedily
>> load everything that exists in a source path, even if you don't actually
>> use it. Personally I like this, but even if I were to make it an option
>> somehow, I'm not aware of a way to stop the compiler from working that
>>way
>> either.
>>
>> > 2. I’m getting lots of errors which are specific to SWF-only output:
>>
>> I just glanced through the part of VSCode that passes options to the
>> compiler for code intelligence (different from the way that asconfigc
>>runs
>> the compiler to build), and I don't think I'm actually using the value
>>of
>> -targets. It's probably defaulting to SWF. I'll play around with that to
>> see if I can improve things when -targets is specifically JSFlex.
>>
>> >   a. I’m not getting JS specific classes recognized.
>>
>> Just to be clear, are you referring to DOM classes like
>>HTMLButtonElement
>> and other browser APIs here? I just want to be sure so that I test the
>> right thing when I make changes.
>>
>> - Josh
>>
>> On Thu, Jul 6, 2017 at 2:16 PM, Harbs  wrote:
>>
>>> Since updating to “dual”has been reporting lots of errors. When I
>>>build,
>>> both the debug and release builds build correctly, but the PROBLEMS
>>>window
>>> and the live code hinting report lots of (non) issues. I’m not sure
>>>what
>>> the source of the errors are, but here are the details:
>>>
>>> I’ve tried a few variations of the asconfig file, but here’s what I
>>> currently have:
>>> {
>>> "config": "flex",
>>> "compilerOptions": {
>>> "debug": true,
>>> "js-output-type": "flexjs",
>>> "targets": ["JSFlex"],
>>> "source-map": false,
>>> 

Re: [FlexJS][VS Code] dual issues

2017-07-06 Thread Alex Harui
I agree, it will be great to get JS API code-intelligence.

Just out of curiosity, what did you have to change?  One work item for the
future is to merge the "JS" SWC into the "SWF" SWC so there is only one
SWC per library instead of the current pair like Core.SWC and CoreJS.swc.
I'm trying to assess the impact of doing so.  We can certainly teach the
compiler to pick different classes based on the current -target, but right
now for FB, all it knows is that one set of SWCs or the other is on the
library path.  If we merge the SWCS, there is no other way to tell the
compiler which APIs to use by default, and I'm not sure I can control that
from outside FB.

Maybe just the Maven artifacts will be merged and we'll keep the pairs of
SWCs for IDEs.

Thoughts?
-Alex

On 7/6/17, 4:12 PM, "Josh Tynjala"  wrote:

>Okay, I figured out how to make VSCode switch to JS APIs instead of SWF
>APIs for completion and things. In the next version of the extension, when
>the targets compiler option is specified in asconfig.json, and the first
>value isn't "SWF", the extension will offer JS APIs. That includes giving
>you access to native browser APIs instead of Flash Player APIs. That's
>going to be a really nice change, I think. Thanks for pointing out this
>issue!
>
>- Josh
>
>On Thu, Jul 6, 2017 at 2:35 PM, Josh Tynjala 
>wrote:
>
>> > The js-output-type, library-path and external-library-path options are
>> probably not needed
>>
>> I would get rid of -js-output-type. I assume that -targets takes
>> precedence, but just to be safe, you shouldn't use both.
>>-js-output-type is
>> necessary for 0.7.0, but switch entirely to -targets with 0.8.0.
>>
>> > It would be nice to have full support for the new compiler options
>>
>> html-template, html-output-filename, js-compiler-option,
>> js-external-library-path, js-library-path, swf-external-library-path,
>> swf-library-path, and remove-circulars should all work in the
>> compilerOptions field if you're using the latest vscode-nextgenas 0.4.4
>>and
>> asconfigc 0.5.1. I just updated asconfigc to support these options last
>> week, and I haven't made an official announcement yet, so you might have
>> missed that one.
>>
>> I think there may be one or two you'll still need to put into
>> additionalOptions, but you should be able to switch over most of them.
>>
>> > 1. I’m getting “problems” even for files which are not used in my
>> project and are not open.
>>
>> This is something I'm aware of in VSCode. The compiler seems to greedily
>> load everything that exists in a source path, even if you don't actually
>> use it. Personally I like this, but even if I were to make it an option
>> somehow, I'm not aware of a way to stop the compiler from working that
>>way
>> either.
>>
>> > 2. I’m getting lots of errors which are specific to SWF-only output:
>>
>> I just glanced through the part of VSCode that passes options to the
>> compiler for code intelligence (different from the way that asconfigc
>>runs
>> the compiler to build), and I don't think I'm actually using the value
>>of
>> -targets. It's probably defaulting to SWF. I'll play around with that to
>> see if I can improve things when -targets is specifically JSFlex.
>>
>> >   a. I’m not getting JS specific classes recognized.
>>
>> Just to be clear, are you referring to DOM classes like
>>HTMLButtonElement
>> and other browser APIs here? I just want to be sure so that I test the
>> right thing when I make changes.
>>
>> - Josh
>>
>> On Thu, Jul 6, 2017 at 2:16 PM, Harbs  wrote:
>>
>>> Since updating to “dual”has been reporting lots of errors. When I
>>>build,
>>> both the debug and release builds build correctly, but the PROBLEMS
>>>window
>>> and the live code hinting report lots of (non) issues. I’m not sure
>>>what
>>> the source of the errors are, but here are the details:
>>>
>>> I’ve tried a few variations of the asconfig file, but here’s what I
>>> currently have:
>>> {
>>> "config": "flex",
>>> "compilerOptions": {
>>> "debug": true,
>>> "js-output-type": "flexjs",
>>> "targets": ["JSFlex"],
>>> "source-map": false,
>>> "library-path": [
>>> "lib"
>>> ],
>>> "external-library-path": [
>>> "typedefs"
>>> ]
>>> },
>>> "copySourcePathAssets": true,
>>> "additionalOptions": "-remove-circulars
>>>-js-output-optimization=skipAsCoercions
>>> -html-template=src/resources/mdl-js-index-template.html
>>> -js-external-library-path+=typedefs -js-library-path+=lib",
>>> "files":
>>> [
>>> "src/PortedPrintUI.mxml"
>>> ]
>>> }
>>>
>>> The js-output-type, library-path and external-library-path options are
>>> probably not needed, but they don’t seem to adversely effect the
>>>builds.
>>> (It would be nice to have full support for the new compiler options.)
>>>
>>> Problems:
>>> 1. I’m getting “problems” even for files which are not used in my

Re: [FlexJS][VS Code] dual issues

2017-07-06 Thread Josh Tynjala
Okay, I figured out how to make VSCode switch to JS APIs instead of SWF
APIs for completion and things. In the next version of the extension, when
the targets compiler option is specified in asconfig.json, and the first
value isn't "SWF", the extension will offer JS APIs. That includes giving
you access to native browser APIs instead of Flash Player APIs. That's
going to be a really nice change, I think. Thanks for pointing out this
issue!

- Josh

On Thu, Jul 6, 2017 at 2:35 PM, Josh Tynjala  wrote:

> > The js-output-type, library-path and external-library-path options are
> probably not needed
>
> I would get rid of -js-output-type. I assume that -targets takes
> precedence, but just to be safe, you shouldn't use both. -js-output-type is
> necessary for 0.7.0, but switch entirely to -targets with 0.8.0.
>
> > It would be nice to have full support for the new compiler options
>
> html-template, html-output-filename, js-compiler-option,
> js-external-library-path, js-library-path, swf-external-library-path,
> swf-library-path, and remove-circulars should all work in the
> compilerOptions field if you're using the latest vscode-nextgenas 0.4.4 and
> asconfigc 0.5.1. I just updated asconfigc to support these options last
> week, and I haven't made an official announcement yet, so you might have
> missed that one.
>
> I think there may be one or two you'll still need to put into
> additionalOptions, but you should be able to switch over most of them.
>
> > 1. I’m getting “problems” even for files which are not used in my
> project and are not open.
>
> This is something I'm aware of in VSCode. The compiler seems to greedily
> load everything that exists in a source path, even if you don't actually
> use it. Personally I like this, but even if I were to make it an option
> somehow, I'm not aware of a way to stop the compiler from working that way
> either.
>
> > 2. I’m getting lots of errors which are specific to SWF-only output:
>
> I just glanced through the part of VSCode that passes options to the
> compiler for code intelligence (different from the way that asconfigc runs
> the compiler to build), and I don't think I'm actually using the value of
> -targets. It's probably defaulting to SWF. I'll play around with that to
> see if I can improve things when -targets is specifically JSFlex.
>
> >   a. I’m not getting JS specific classes recognized.
>
> Just to be clear, are you referring to DOM classes like HTMLButtonElement
> and other browser APIs here? I just want to be sure so that I test the
> right thing when I make changes.
>
> - Josh
>
> On Thu, Jul 6, 2017 at 2:16 PM, Harbs  wrote:
>
>> Since updating to “dual”has been reporting lots of errors. When I build,
>> both the debug and release builds build correctly, but the PROBLEMS window
>> and the live code hinting report lots of (non) issues. I’m not sure what
>> the source of the errors are, but here are the details:
>>
>> I’ve tried a few variations of the asconfig file, but here’s what I
>> currently have:
>> {
>> "config": "flex",
>> "compilerOptions": {
>> "debug": true,
>> "js-output-type": "flexjs",
>> "targets": ["JSFlex"],
>> "source-map": false,
>> "library-path": [
>> "lib"
>> ],
>> "external-library-path": [
>> "typedefs"
>> ]
>> },
>> "copySourcePathAssets": true,
>> "additionalOptions": "-remove-circulars 
>> -js-output-optimization=skipAsCoercions
>> -html-template=src/resources/mdl-js-index-template.html
>> -js-external-library-path+=typedefs -js-library-path+=lib",
>> "files":
>> [
>> "src/PortedPrintUI.mxml"
>> ]
>> }
>>
>> The js-output-type, library-path and external-library-path options are
>> probably not needed, but they don’t seem to adversely effect the builds.
>> (It would be nice to have full support for the new compiler options.)
>>
>> Problems:
>> 1. I’m getting “problems” even for files which are not used in my project
>> and are not open.
>> 2. I’m getting lots of errors which are specific to SWF-only output:
>>   a. I’m not getting JS specific classes recognized.
>>   b. I’m getting lots of incompatible overrides (to Flash methods)
>>   c. I’m getting overriding function not marked for override errors on
>> functions that are implemented in flash (i.e. public function get
>> scaleX():Number)
>>   d. conflicts between variables and Flash getters.
>>   e. etc...
>>
>> Thanks,
>> Harbs
>
>
>


Re: [FlexJS][VS Code] dual issues

2017-07-06 Thread Josh Tynjala
> The js-output-type, library-path and external-library-path options are
probably not needed

I would get rid of -js-output-type. I assume that -targets takes
precedence, but just to be safe, you shouldn't use both. -js-output-type is
necessary for 0.7.0, but switch entirely to -targets with 0.8.0.

> It would be nice to have full support for the new compiler options

html-template, html-output-filename, js-compiler-option,
js-external-library-path, js-library-path, swf-external-library-path,
swf-library-path, and remove-circulars should all work in the
compilerOptions field if you're using the latest vscode-nextgenas 0.4.4 and
asconfigc 0.5.1. I just updated asconfigc to support these options last
week, and I haven't made an official announcement yet, so you might have
missed that one.

I think there may be one or two you'll still need to put into
additionalOptions, but you should be able to switch over most of them.

> 1. I’m getting “problems” even for files which are not used in my project
and are not open.

This is something I'm aware of in VSCode. The compiler seems to greedily
load everything that exists in a source path, even if you don't actually
use it. Personally I like this, but even if I were to make it an option
somehow, I'm not aware of a way to stop the compiler from working that way
either.

> 2. I’m getting lots of errors which are specific to SWF-only output:

I just glanced through the part of VSCode that passes options to the
compiler for code intelligence (different from the way that asconfigc runs
the compiler to build), and I don't think I'm actually using the value of
-targets. It's probably defaulting to SWF. I'll play around with that to
see if I can improve things when -targets is specifically JSFlex.

>   a. I’m not getting JS specific classes recognized.

Just to be clear, are you referring to DOM classes like HTMLButtonElement
and other browser APIs here? I just want to be sure so that I test the
right thing when I make changes.

- Josh

On Thu, Jul 6, 2017 at 2:16 PM, Harbs  wrote:

> Since updating to “dual”has been reporting lots of errors. When I build,
> both the debug and release builds build correctly, but the PROBLEMS window
> and the live code hinting report lots of (non) issues. I’m not sure what
> the source of the errors are, but here are the details:
>
> I’ve tried a few variations of the asconfig file, but here’s what I
> currently have:
> {
> "config": "flex",
> "compilerOptions": {
> "debug": true,
> "js-output-type": "flexjs",
> "targets": ["JSFlex"],
> "source-map": false,
> "library-path": [
> "lib"
> ],
> "external-library-path": [
> "typedefs"
> ]
> },
> "copySourcePathAssets": true,
> "additionalOptions": "-remove-circulars 
> -js-output-optimization=skipAsCoercions
> -html-template=src/resources/mdl-js-index-template.html
> -js-external-library-path+=typedefs -js-library-path+=lib",
> "files":
> [
> "src/PortedPrintUI.mxml"
> ]
> }
>
> The js-output-type, library-path and external-library-path options are
> probably not needed, but they don’t seem to adversely effect the builds.
> (It would be nice to have full support for the new compiler options.)
>
> Problems:
> 1. I’m getting “problems” even for files which are not used in my project
> and are not open.
> 2. I’m getting lots of errors which are specific to SWF-only output:
>   a. I’m not getting JS specific classes recognized.
>   b. I’m getting lots of incompatible overrides (to Flash methods)
>   c. I’m getting overriding function not marked for override errors on
> functions that are implemented in flash (i.e. public function get
> scaleX():Number)
>   d. conflicts between variables and Flash getters.
>   e. etc...
>
> Thanks,
> Harbs


[FlexJS][VS Code] dual issues

2017-07-06 Thread Harbs
Since updating to “dual”has been reporting lots of errors. When I build, both 
the debug and release builds build correctly, but the PROBLEMS window and the 
live code hinting report lots of (non) issues. I’m not sure what the source of 
the errors are, but here are the details:

I’ve tried a few variations of the asconfig file, but here’s what I currently 
have:
{
"config": "flex",
"compilerOptions": {
"debug": true,
"js-output-type": "flexjs",
"targets": ["JSFlex"],
"source-map": false,
"library-path": [
"lib"
],
"external-library-path": [
"typedefs"
]
},
"copySourcePathAssets": true,
"additionalOptions": "-remove-circulars 
-js-output-optimization=skipAsCoercions 
-html-template=src/resources/mdl-js-index-template.html 
-js-external-library-path+=typedefs -js-library-path+=lib",
"files":
[
"src/PortedPrintUI.mxml"
]
}

The js-output-type, library-path and external-library-path options are probably 
not needed, but they don’t seem to adversely effect the builds. (It would be 
nice to have full support for the new compiler options.)

Problems:
1. I’m getting “problems” even for files which are not used in my project and 
are not open.
2. I’m getting lots of errors which are specific to SWF-only output:
  a. I’m not getting JS specific classes recognized.
  b. I’m getting lots of incompatible overrides (to Flash methods)
  c. I’m getting overriding function not marked for override errors on 
functions that are implemented in flash (i.e. public function get 
scaleX():Number)
  d. conflicts between variables and Flash getters.
  e. etc...

Thanks,
Harbs

Re: dual issues

2017-06-05 Thread Harbs
In compilerOptions.

Here’s my tasks.json file:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "asconfigc",
"isShellCommand": true,
"args": [
"--flexHome=/FlexSDK/FlexJSNightly"
],
"windows": {
"args": [
"--flexHome=C:\\dev\\flexjs_builds\\nightly_07"
]
},
"showOutput": "always"
}

asconfig.json:
{
"config": "flex",
"compilerOptions": {
"debug": true,
"targets": ["JSFlex"],
"source-map": false,
"library-path": [
"lib"
],
"external-library-path": [
"typedefs"
]
},
"copySourcePathAssets": true,
"additionalOptions": "-remove-circulars 
-js-output-optimization=skipAsCoercions 
-html-template=src/resources/mdl-js-index-template.html 
-js-external-library-path+=typedefs -js-library-path+=lib",
"files":
[
"src/PortedPrintUI.mxml"
]
}

I’m having other issues after switching to dual as well. Maybe I should show 
you…

Harbs

> On Jun 5, 2017, at 4:31 PM, Josh Tynjala  wrote:
> 
> Are you setting debug in an argument passed to asconfigc, like this?
> 
> asconfigc --debug=false
> 
> Or is it specified in asconfig.json in the compilerOptions section?
> 
> Both will work, but the asconfigc command line option will always override
> whatever is in asconfig.json. In VSCode, the generated tasks.json now
> defaults to --debug=true, so that could take precedence if you're trying to
> set debug to false in asconfig.json. You might want to double-check both
> locations (asconfig.json and tasks.json).
> 
> - Josh
> 
> On Sun, Jun 4, 2017 at 2:08 AM, Harbs  wrote:
> 
>> I’m seeing similar times using both ant and asconfig for debug. (Both are
>> good.)
>> 
>> asconfig is not compiling a release build at all — even if I specify
>> debug=false.
>> 
>> I have not tried with Maven.
>> 
>>> On Jun 4, 2017, at 12:06 PM, Justin Mclean 
>> wrote:
>>> 
>>> Hi,
>>> 
 Justin you are compiling by Maven ?
>>> 
>>> Yep and Debug builds are noticeably slower for me.
>>> 
>>> Justin
>> 
>> 



Re: dual issues

2017-06-05 Thread Josh Tynjala
Are you setting debug in an argument passed to asconfigc, like this?

asconfigc --debug=false

Or is it specified in asconfig.json in the compilerOptions section?

Both will work, but the asconfigc command line option will always override
whatever is in asconfig.json. In VSCode, the generated tasks.json now
defaults to --debug=true, so that could take precedence if you're trying to
set debug to false in asconfig.json. You might want to double-check both
locations (asconfig.json and tasks.json).

- Josh

On Sun, Jun 4, 2017 at 2:08 AM, Harbs  wrote:

> I’m seeing similar times using both ant and asconfig for debug. (Both are
> good.)
>
> asconfig is not compiling a release build at all — even if I specify
> debug=false.
>
> I have not tried with Maven.
>
> > On Jun 4, 2017, at 12:06 PM, Justin Mclean 
> wrote:
> >
> > Hi,
> >
> >> Justin you are compiling by Maven ?
> >
> > Yep and Debug builds are noticeably slower for me.
> >
> > Justin
>
>


Re: dual issues

2017-06-04 Thread Alex Harui
For me, the Ant build calls the "compile" target in
examples/build_example.xml and sets the config_arg to use
frameworks/js-config.xml which has targets set to just JS.

A better example might be examples/flexjs/MDLExample.  For Ant, it has a
src/main/config/compile-app-config.xml which specifies:
JSFlex

And for me, no SWF is produced.


HTH,
-Alex

On 6/4/17, 10:31 AM, "Harbs"  wrote:

>That is using -js-output-type=FLEXJS
>
>My understanding is that we are supposed to use -targets=JSFlex now.
>
>Is that not right?
>
>> On Jun 4, 2017, at 5:43 PM, Alex Harui  wrote:
>> 
>> The examples/native/ButtonExample does not produce a SWF for me, so
>>maybe
>> compare that setup against yours.
>> 
>> HTH,
>> -Alex
>> 
>> On 6/4/17, 12:56 AM, "Harbs"  wrote:
>> 
>>> Good news: Prior to the switch to dual, I was not getting a minified
>>> release build working. That’s now working.
>>> Bad news: It takes much longer than it used to, and I’m getting a swf
>>> file even though I’m only using -targets=JSFlex
>>> 
>>> Harbs
>> 
>



Re: dual issues

2017-06-04 Thread Harbs
That is using -js-output-type=FLEXJS

My understanding is that we are supposed to use -targets=JSFlex now.

Is that not right?

> On Jun 4, 2017, at 5:43 PM, Alex Harui  wrote:
> 
> The examples/native/ButtonExample does not produce a SWF for me, so maybe
> compare that setup against yours.
> 
> HTH,
> -Alex
> 
> On 6/4/17, 12:56 AM, "Harbs"  wrote:
> 
>> Good news: Prior to the switch to dual, I was not getting a minified
>> release build working. That’s now working.
>> Bad news: It takes much longer than it used to, and I’m getting a swf
>> file even though I’m only using -targets=JSFlex
>> 
>> Harbs
> 



Re: dual issues

2017-06-04 Thread Alex Harui
The examples/native/ButtonExample does not produce a SWF for me, so maybe
compare that setup against yours.

HTH,
-Alex

On 6/4/17, 12:56 AM, "Harbs"  wrote:

>Good news: Prior to the switch to dual, I was not getting a minified
>release build working. That’s now working.
>Bad news: It takes much longer than it used to, and I’m getting a swf
>file even though I’m only using -targets=JSFlex
>
>Harbs



Re: dual issues

2017-06-04 Thread Harbs
I’m seeing similar times using both ant and asconfig for debug. (Both are good.)

asconfig is not compiling a release build at all — even if I specify 
debug=false.

I have not tried with Maven.

> On Jun 4, 2017, at 12:06 PM, Justin Mclean  wrote:
> 
> Hi,
> 
>> Justin you are compiling by Maven ?
> 
> Yep and Debug builds are noticeably slower for me.
> 
> Justin



Re: dual issues

2017-06-04 Thread Justin Mclean
Hi,

> Justin you are compiling by Maven ?

Yep and Debug builds are noticeably slower for me.

Justin


Re: dual issues

2017-06-04 Thread Harbs
To be clear:
Debug builds are as fast if not faster than they used to be.
Release build are much slower.

I’m getting a debug build (with remove circulars) of my (complex) app taking 
about 10 seconds.
The release build takes about 3 minutes.


> On Jun 4, 2017, at 11:57 AM, Justin Mclean  wrote:
> 
> Hi,
> 
>> Bad news: It takes much longer than it used to, and I’m getting a swf file 
>> even though I’m only using -targets=JSFlex
> 
> Compiles are also taking a lot longer for me and I’m also only using the 
> JSFlex target.
> 
> Thanks,
> Justin



Re: dual issues

2017-06-04 Thread piotrz
As I remember Harbs is compiling it by ANT ? Am I right ? Justin you are
compiling by Maven ?

Piotr



-
Apache Flex PMC
piotrzarzyck...@gmail.com
--
View this message in context: 
http://apache-flex-development.247.n4.nabble.com/dual-issues-tp61955p62070.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: dual issues

2017-06-04 Thread Justin Mclean
Hi,

> Bad news: It takes much longer than it used to, and I’m getting a swf file 
> even though I’m only using -targets=JSFlex

Compiles are also taking a lot longer for me and I’m also only using the JSFlex 
target.

Thanks,
Justin

Re: dual issues

2017-06-04 Thread piotrz
Ahh..That's not good. Another thing for resolve in release definitly.

Piotr



-
Apache Flex PMC
piotrzarzyck...@gmail.com
--
View this message in context: 
http://apache-flex-development.247.n4.nabble.com/dual-issues-tp61955p62066.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: dual issues

2017-06-04 Thread Harbs
Good news: Prior to the switch to dual, I was not getting a minified release 
build working. That’s now working.
Bad news: It takes much longer than it used to, and I’m getting a swf file even 
though I’m only using -targets=JSFlex

Harbs

Re: dual issues

2017-06-04 Thread Harbs
Objects like Promise, Map, Set etc. are available by default in pretty much all 
modern browsers.

Things like await, arrow functions, let, etc. are being added by browsers all 
the time. I’m not sure exactly which ones have what right now, but they are 
pretty far along already, so that article is already out of date. ;-)

Either way, we’re not outputting ES6-style code (currently), so those features 
are a non-issue.

> On Jun 4, 2017, at 10:34 AM, Alex Harui  wrote:
> 
> I thought es6 wasn't always on by default?
> 
> https://thenextweb.com/dd/2016/03/09/6-reasons-need-learn-javascript-es6-no
> w-not-later/#.tnw_5KKUOOPX
> 
> I haven't been paying attention so maybe all browsers are fully compliant
> now?
> 
> -Alex
> 
> On 6/4/17, 12:01 AM, "Harbs"  wrote:
> 
>> Not sure what you mean here.
>> 
>>> On Jun 4, 2017, at 8:52 AM, Alex Harui  wrote:
>>> 
>>> Does FlexJS emit the right code to enable es6 APIs?
>> 
> 



Re: dual issues

2017-06-04 Thread Alex Harui
I thought es6 wasn't always on by default?

https://thenextweb.com/dd/2016/03/09/6-reasons-need-learn-javascript-es6-no
w-not-later/#.tnw_5KKUOOPX

I haven't been paying attention so maybe all browsers are fully compliant
now?

-Alex

On 6/4/17, 12:01 AM, "Harbs"  wrote:

>Not sure what you mean here.
>
>> On Jun 4, 2017, at 8:52 AM, Alex Harui  wrote:
>> 
>> Does FlexJS emit the right code to enable es6 APIs?
>



Re: dual issues

2017-06-04 Thread Harbs
Not sure what you mean here.

> On Jun 4, 2017, at 8:52 AM, Alex Harui  wrote:
> 
> Does FlexJS emit the right code to enable es6 APIs?



Re: dual issues

2017-06-03 Thread Alex Harui


On 6/3/17, 2:02 PM, "Harbs"  wrote:

>I just ran into another issue.
>
>I’m not sure why dual would have changed this, but I’m now getting an
>(erroneous) error when trying to use Promises:
>
>Incorrect number of arguments.  Expected no more than 0
>
>   return new Promise(function(resolve:*,reject:*):void{
>  ^

Looking at the typedefs, Promise is in missing.js and defined to have no
args.  It is also in es6.js.  Maybe there is some randomness about which
definition wins.  Seems like you could remove the one from missing.js.
Does FlexJS emit the right code to enable es6 APIs?

-Alex




Re: dual issues

2017-06-03 Thread Harbs
I just ran into another issue.

I’m not sure why dual would have changed this, but I’m now getting an 
(erroneous) error when trying to use Promises:

Incorrect number of arguments.  Expected no more than 0

return new Promise(function(resolve:*,reject:*):void{
   ^

> On Jun 1, 2017, at 10:39 AM, Harbs  wrote:
> 
> My bad. I accidentally overwrote my copy of BasicJS.swc.
> 
> After fixing some issues, I got my app to run using the latest dual changes.
> 
> All in all, switching to dual went a lot better than I expected.
> 
> Great work, Alex!
> 
> I think the switch to the dual approach was the right one. There’s still 
> probably some rough edges to improve, but it’s definitely usable.
> 
> Thanks,
> Harbs
> 
>> On Jun 1, 2017, at 5:57 AM, Harbs  wrote:
>> 
>> Another weird issue:
>> 
>>> /Users/harbs/Documents/git/PrintUI/printui-flexjs/PortedPrintUI/src/com/printui/dummy/view/Image.as(12):
>>>  col: 15 interface method imageElement in interface IImage not implemented 
>>> by class Image
>>> 
>>> public class Image extends BinaryImage
>>>  ^
>>> 
>>> /Users/harbs/Documents/git/PrintUI/printui-flexjs/PortedPrintUI/src/com/printui/dummy/view/Image.as(12):
>>>  col: 15 interface method applyImageData in interface IImage not 
>>> implemented by class Image
>>> 
>>> public class Image extends BinaryImage
>>> 
>> 
>> org.apache.flex.html.BinaryImage which in tern subclasses 
>> org.apache.flex.html.Image. org.apache.flex.html.Image implements these two 
>> methods. I figured the compiler might be getting confused by the fact that 
>> Image is named the same as an ancestor class, so I changed the name and I'm 
>> getting the same error in additon to a null pointer error:
>> 
>>> 
>>> /Users/harbs/Documents/git/PrintUI/printui-flexjs/PortedPrintUI/src/com/printui/dummy/view/PUIImage.as(12):
>>>  col: 15 interface method imageElement in interface IImage not implemented 
>>> by class PUIImage
>>> 
>>> public class PUIImage extends BinaryImage
>>>  ^
>>> 
>>> /Users/harbs/Documents/git/PrintUI/printui-flexjs/PortedPrintUI/src/com/printui/dummy/view/PUIImage.as(12):
>>>  col: 15 interface method applyImageData in interface IImage not 
>>> implemented by class PUIImage
>>> 
>>> public class PUIImage extends BinaryImage
>>>  ^
>>> 
>>> /Users/harbs/Documents/git/PrintUI/printui-flexjs/PortedPrintUI/src/com/printui/view/components/DesignAreaComponents/drawnObjects/ImageObject.as(59):
>>>  col: 3 java.lang.NullPointerException
>>> at 
>>> org.apache.flex.compiler.internal.projects.FlexProject.isValidTypeConversion(FlexProject.java:2304)
>>> at 
>>> org.apache.flex.compiler.internal.semantics.MethodBodySemanticChecker.checkImplicitConversion(MethodBodySemanticChecker.java:564)
>>> at 
>>> org.apache.flex.compiler.internal.semantics.MethodBodySemanticChecker.checkImplicitConversion(MethodBodySemanticChecker.java:374)
>>> at 
>>> org.apache.flex.compiler.internal.semantics.MethodBodySemanticChecker.checkAssignment(MethodBodySemanticChecker.java:246)
>>> at 
>>> org.apache.flex.compiler.internal.as.codegen.ABCGeneratingReducer.reduce_assignToNameExpr_to_void_expression(ABCGeneratingReducer.java:2947)
>>> at 
>>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.action_237(CmcEmitter.java:4451)
>>> at 
>>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.dispatchAction(CmcEmitter.java:8067)
>>> at 
>>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39127)
>>> at 
>>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.dispatchAction(CmcEmitter.java:9362)
>>> at 
>>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39127)
>>> at 
>>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39104)
>>> at 
>>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39155)
>>> at 
>>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39126)
>>> at 
>>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39104)
>>> at 
>>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39146)
>>> at 
>>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39126)
>>> at 
>>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39104)
>>> at 
>>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.burm(CmcEmitter.java:39406)
>>> at 
>>> org.apache.flex.compiler.internal.as.codegen.ABCGenerator.generateInstructions(ABCGenerator.java:228)
>>> at 
>>> org.apache.flex.compiler.internal.as.codegen.ABCGenerator.generateMethodBodyForFunction(ABCGenerator.java:393)
>>> at 
>>> 

Re: dual issues

2017-06-01 Thread Josh Tynjala
When they're defined in the *-config.xml files, they'll be picked up
automatically without any special code in VSCode. However, now that you
mention it, I need to allow app developers to customize these in
asconfig.json too.

- Josh

On Jun 1, 2017 12:04 AM, "Alex Harui"  wrote:

Josh, there are new compiler options like js-external-library-path,
js-library-path, swf-library-path, swf-external-library-path.  Does your
VSCode integration handle these?

-Alex

On 5/31/17, 8:42 PM, "Josh Tynjala"  wrote:

>As I understand it, the compiler should just take care of differences
>between JS and SWF, as long as your targets option is correct. VSCode
>shouldn't need to do anything​ special except to pass in the correct
>options.
>
>There's nothing related to dual changes on my to-do list at this time, but
>maybe I missed something important...
>
>- Josh
>
>On May 31, 2017 7:52 PM, "Harbs"  wrote:
>
>Josh,
>
>VS Code is now reporting lots of errors in the Problems window. I’m
>guessing it does not know how to differentiate between JS and SWF builds
>using dual?
>
>Is that something on your to-do list?
>
>Thanks,
>Harbs
>
>> On Jun 1, 2017, at 5:10 AM, Harbs  wrote:
>>
>> Bingo. Thanks!
>>
>> SWF output still gets all kinds of errors, but the JS output is pretty
>error free. I still have some fixing up to do before I can see how well it
>actually works, but at least the compiler is not complaining now.
>>
>>> On Jun 1, 2017, at 4:45 AM, Josh Tynjala  wrote:
>>>
>>> Try replacing the js-output-type compiler option with:
>>>
>>> "targets": ["JSFlex"]
>>>
>>> - Josh
>>>
>>> On May 31, 2017 6:26 PM, "Harbs"  wrote:
>>>
 I’m using asconfig in VSCode to compile with these settings:
   "config": "flex",
   "compilerOptions": {
   "debug": false,
   "js-output-type": "flexjs",
   "source-map": false,
   "library-path": [
   "lib"
   ],

> On Jun 1, 2017, at 1:04 AM, Justin Mclean 
 wrote:
>
> HI,
>
>> Am I missing something?
>
> Perhaps try JSFlex in your pom.xml? I believe the
 name changed from pre to post dual branch.
>
> Justin
>


>>


Re: dual issues

2017-06-01 Thread piotrz
Hi Harbs,

Great news! This approach us to release!

Piotr



-
Apache Flex PMC
piotrzarzyck...@gmail.com
--
View this message in context: 
http://apache-flex-development.247.n4.nabble.com/dual-issues-tp61955p61988.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: dual issues

2017-06-01 Thread Harbs
My bad. I accidentally overwrote my copy of BasicJS.swc.

After fixing some issues, I got my app to run using the latest dual changes.

All in all, switching to dual went a lot better than I expected.

Great work, Alex!

I think the switch to the dual approach was the right one. There’s still 
probably some rough edges to improve, but it’s definitely usable.

Thanks,
Harbs

> On Jun 1, 2017, at 5:57 AM, Harbs  wrote:
> 
> Another weird issue:
> 
>> /Users/harbs/Documents/git/PrintUI/printui-flexjs/PortedPrintUI/src/com/printui/dummy/view/Image.as(12):
>>  col: 15 interface method imageElement in interface IImage not implemented 
>> by class Image
>> 
>>  public class Image extends BinaryImage
>>   ^
>> 
>> /Users/harbs/Documents/git/PrintUI/printui-flexjs/PortedPrintUI/src/com/printui/dummy/view/Image.as(12):
>>  col: 15 interface method applyImageData in interface IImage not implemented 
>> by class Image
>> 
>>  public class Image extends BinaryImage
>> 
> 
> org.apache.flex.html.BinaryImage which in tern subclasses 
> org.apache.flex.html.Image. org.apache.flex.html.Image implements these two 
> methods. I figured the compiler might be getting confused by the fact that 
> Image is named the same as an ancestor class, so I changed the name and I'm 
> getting the same error in additon to a null pointer error:
> 
>>  
>> /Users/harbs/Documents/git/PrintUI/printui-flexjs/PortedPrintUI/src/com/printui/dummy/view/PUIImage.as(12):
>>  col: 15 interface method imageElement in interface IImage not implemented 
>> by class PUIImage
>> 
>>  public class PUIImage extends BinaryImage
>>   ^
>> 
>> /Users/harbs/Documents/git/PrintUI/printui-flexjs/PortedPrintUI/src/com/printui/dummy/view/PUIImage.as(12):
>>  col: 15 interface method applyImageData in interface IImage not implemented 
>> by class PUIImage
>> 
>>  public class PUIImage extends BinaryImage
>>   ^
>> 
>> /Users/harbs/Documents/git/PrintUI/printui-flexjs/PortedPrintUI/src/com/printui/view/components/DesignAreaComponents/drawnObjects/ImageObject.as(59):
>>  col: 3 java.lang.NullPointerException
>>  at 
>> org.apache.flex.compiler.internal.projects.FlexProject.isValidTypeConversion(FlexProject.java:2304)
>>  at 
>> org.apache.flex.compiler.internal.semantics.MethodBodySemanticChecker.checkImplicitConversion(MethodBodySemanticChecker.java:564)
>>  at 
>> org.apache.flex.compiler.internal.semantics.MethodBodySemanticChecker.checkImplicitConversion(MethodBodySemanticChecker.java:374)
>>  at 
>> org.apache.flex.compiler.internal.semantics.MethodBodySemanticChecker.checkAssignment(MethodBodySemanticChecker.java:246)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.ABCGeneratingReducer.reduce_assignToNameExpr_to_void_expression(ABCGeneratingReducer.java:2947)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.action_237(CmcEmitter.java:4451)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.dispatchAction(CmcEmitter.java:8067)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39127)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.dispatchAction(CmcEmitter.java:9362)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39127)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39104)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39155)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39126)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39104)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39146)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39126)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39104)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.burm(CmcEmitter.java:39406)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.ABCGenerator.generateInstructions(ABCGenerator.java:228)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.ABCGenerator.generateMethodBodyForFunction(ABCGenerator.java:393)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.ABCGenerator.generateMethodBodyForFunction(ABCGenerator.java:347)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.ABCGenerator.generateFunction(ABCGenerator.java:262)
>>  at 
>> org.apache.flex.compiler.internal.as.codegen.ClassDirectiveProcessor.finishClassDefinition(ClassDirectiveProcessor.java:639)
>>  at 
>> 

Re: dual issues

2017-06-01 Thread Alex Harui
Josh, there are new compiler options like js-external-library-path,
js-library-path, swf-library-path, swf-external-library-path.  Does your
VSCode integration handle these?

-Alex

On 5/31/17, 8:42 PM, "Josh Tynjala"  wrote:

>As I understand it, the compiler should just take care of differences
>between JS and SWF, as long as your targets option is correct. VSCode
>shouldn't need to do anything​ special except to pass in the correct
>options.
>
>There's nothing related to dual changes on my to-do list at this time, but
>maybe I missed something important...
>
>- Josh
>
>On May 31, 2017 7:52 PM, "Harbs"  wrote:
>
>Josh,
>
>VS Code is now reporting lots of errors in the Problems window. I’m
>guessing it does not know how to differentiate between JS and SWF builds
>using dual?
>
>Is that something on your to-do list?
>
>Thanks,
>Harbs
>
>> On Jun 1, 2017, at 5:10 AM, Harbs  wrote:
>>
>> Bingo. Thanks!
>>
>> SWF output still gets all kinds of errors, but the JS output is pretty
>error free. I still have some fixing up to do before I can see how well it
>actually works, but at least the compiler is not complaining now.
>>
>>> On Jun 1, 2017, at 4:45 AM, Josh Tynjala  wrote:
>>>
>>> Try replacing the js-output-type compiler option with:
>>>
>>> "targets": ["JSFlex"]
>>>
>>> - Josh
>>>
>>> On May 31, 2017 6:26 PM, "Harbs"  wrote:
>>>
 I’m using asconfig in VSCode to compile with these settings:
   "config": "flex",
   "compilerOptions": {
   "debug": false,
   "js-output-type": "flexjs",
   "source-map": false,
   "library-path": [
   "lib"
   ],

> On Jun 1, 2017, at 1:04 AM, Justin Mclean 
 wrote:
>
> HI,
>
>> Am I missing something?
>
> Perhaps try JSFlex in your pom.xml? I believe the
 name changed from pre to post dual branch.
>
> Justin
>


>>



Re: dual issues

2017-05-31 Thread Alex Harui
If targets only has JSFlex, there shouldn't be any SWF compile at all.
The console should spit out what it thinks it needs to do.

Keep in mind that there are now SWCs for SWFs and SWCs for JS.  Prior to
dual, there was a main SWC with SWF APIs that the compiler saw, and JS
that it substituted in the output.  The JS SWC was only used to build
downstream JS SWCs.

If you have a custom SWC before dual and it has platform dependent APIs,
and you are only interested in JS output, you need to make sure your SWC's
upstream SWCs are the JS SWCs and not the SWF SWCs.

That in turn requires being more careful about which SWCs are on the
-library-path vs -swf-library-path vs -js-library-path.  In theory, if you
only want JS output, it should be as simple as making sure everything on
the -library-path is a SWC for JS.

HTH,
-Alex

On 5/31/17, 8:42 PM, "Josh Tynjala"  wrote:

>As I understand it, the compiler should just take care of differences
>between JS and SWF, as long as your targets option is correct. VSCode
>shouldn't need to do anything​ special except to pass in the correct
>options.
>
>There's nothing related to dual changes on my to-do list at this time, but
>maybe I missed something important...
>
>- Josh
>
>On May 31, 2017 7:52 PM, "Harbs"  wrote:
>
>Josh,
>
>VS Code is now reporting lots of errors in the Problems window. I’m
>guessing it does not know how to differentiate between JS and SWF builds
>using dual?
>
>Is that something on your to-do list?
>
>Thanks,
>Harbs
>
>> On Jun 1, 2017, at 5:10 AM, Harbs  wrote:
>>
>> Bingo. Thanks!
>>
>> SWF output still gets all kinds of errors, but the JS output is pretty
>error free. I still have some fixing up to do before I can see how well it
>actually works, but at least the compiler is not complaining now.
>>
>>> On Jun 1, 2017, at 4:45 AM, Josh Tynjala  wrote:
>>>
>>> Try replacing the js-output-type compiler option with:
>>>
>>> "targets": ["JSFlex"]
>>>
>>> - Josh
>>>
>>> On May 31, 2017 6:26 PM, "Harbs"  wrote:
>>>
 I’m using asconfig in VSCode to compile with these settings:
   "config": "flex",
   "compilerOptions": {
   "debug": false,
   "js-output-type": "flexjs",
   "source-map": false,
   "library-path": [
   "lib"
   ],

> On Jun 1, 2017, at 1:04 AM, Justin Mclean 
 wrote:
>
> HI,
>
>> Am I missing something?
>
> Perhaps try JSFlex in your pom.xml? I believe the
 name changed from pre to post dual branch.
>
> Justin
>


>>



Re: dual issues

2017-05-31 Thread Josh Tynjala
As I understand it, the compiler should just take care of differences
between JS and SWF, as long as your targets option is correct. VSCode
shouldn't need to do anything​ special except to pass in the correct
options.

There's nothing related to dual changes on my to-do list at this time, but
maybe I missed something important...

- Josh

On May 31, 2017 7:52 PM, "Harbs"  wrote:

Josh,

VS Code is now reporting lots of errors in the Problems window. I’m
guessing it does not know how to differentiate between JS and SWF builds
using dual?

Is that something on your to-do list?

Thanks,
Harbs

> On Jun 1, 2017, at 5:10 AM, Harbs  wrote:
>
> Bingo. Thanks!
>
> SWF output still gets all kinds of errors, but the JS output is pretty
error free. I still have some fixing up to do before I can see how well it
actually works, but at least the compiler is not complaining now.
>
>> On Jun 1, 2017, at 4:45 AM, Josh Tynjala  wrote:
>>
>> Try replacing the js-output-type compiler option with:
>>
>> "targets": ["JSFlex"]
>>
>> - Josh
>>
>> On May 31, 2017 6:26 PM, "Harbs"  wrote:
>>
>>> I’m using asconfig in VSCode to compile with these settings:
>>>   "config": "flex",
>>>   "compilerOptions": {
>>>   "debug": false,
>>>   "js-output-type": "flexjs",
>>>   "source-map": false,
>>>   "library-path": [
>>>   "lib"
>>>   ],
>>>
 On Jun 1, 2017, at 1:04 AM, Justin Mclean 
>>> wrote:

 HI,

> Am I missing something?

 Perhaps try JSFlex in your pom.xml? I believe the
>>> name changed from pre to post dual branch.

 Justin

>>>
>>>
>


Re: dual issues

2017-05-31 Thread Harbs
Another weird issue:

> /Users/harbs/Documents/git/PrintUI/printui-flexjs/PortedPrintUI/src/com/printui/dummy/view/Image.as(12):
>  col: 15 interface method imageElement in interface IImage not implemented by 
> class Image
> 
>   public class Image extends BinaryImage
>^
> 
> /Users/harbs/Documents/git/PrintUI/printui-flexjs/PortedPrintUI/src/com/printui/dummy/view/Image.as(12):
>  col: 15 interface method applyImageData in interface IImage not implemented 
> by class Image
> 
>   public class Image extends BinaryImage
> 

org.apache.flex.html.BinaryImage which in tern subclasses 
org.apache.flex.html.Image. org.apache.flex.html.Image implements these two 
methods. I figured the compiler might be getting confused by the fact that 
Image is named the same as an ancestor class, so I changed the name and I'm 
getting the same error in additon to a null pointer error:

>   
> /Users/harbs/Documents/git/PrintUI/printui-flexjs/PortedPrintUI/src/com/printui/dummy/view/PUIImage.as(12):
>  col: 15 interface method imageElement in interface IImage not implemented by 
> class PUIImage
> 
>   public class PUIImage extends BinaryImage
>^
> 
> /Users/harbs/Documents/git/PrintUI/printui-flexjs/PortedPrintUI/src/com/printui/dummy/view/PUIImage.as(12):
>  col: 15 interface method applyImageData in interface IImage not implemented 
> by class PUIImage
> 
>   public class PUIImage extends BinaryImage
>^
> 
> /Users/harbs/Documents/git/PrintUI/printui-flexjs/PortedPrintUI/src/com/printui/view/components/DesignAreaComponents/drawnObjects/ImageObject.as(59):
>  col: 3 java.lang.NullPointerException
>   at 
> org.apache.flex.compiler.internal.projects.FlexProject.isValidTypeConversion(FlexProject.java:2304)
>   at 
> org.apache.flex.compiler.internal.semantics.MethodBodySemanticChecker.checkImplicitConversion(MethodBodySemanticChecker.java:564)
>   at 
> org.apache.flex.compiler.internal.semantics.MethodBodySemanticChecker.checkImplicitConversion(MethodBodySemanticChecker.java:374)
>   at 
> org.apache.flex.compiler.internal.semantics.MethodBodySemanticChecker.checkAssignment(MethodBodySemanticChecker.java:246)
>   at 
> org.apache.flex.compiler.internal.as.codegen.ABCGeneratingReducer.reduce_assignToNameExpr_to_void_expression(ABCGeneratingReducer.java:2947)
>   at 
> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.action_237(CmcEmitter.java:4451)
>   at 
> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.dispatchAction(CmcEmitter.java:8067)
>   at 
> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39127)
>   at 
> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.dispatchAction(CmcEmitter.java:9362)
>   at 
> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39127)
>   at 
> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39104)
>   at 
> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39155)
>   at 
> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39126)
>   at 
> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39104)
>   at 
> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduceSubgoals(CmcEmitter.java:39146)
>   at 
> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduceAntecedent(CmcEmitter.java:39126)
>   at 
> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.reduce(CmcEmitter.java:39104)
>   at 
> org.apache.flex.compiler.internal.as.codegen.CmcEmitter.burm(CmcEmitter.java:39406)
>   at 
> org.apache.flex.compiler.internal.as.codegen.ABCGenerator.generateInstructions(ABCGenerator.java:228)
>   at 
> org.apache.flex.compiler.internal.as.codegen.ABCGenerator.generateMethodBodyForFunction(ABCGenerator.java:393)
>   at 
> org.apache.flex.compiler.internal.as.codegen.ABCGenerator.generateMethodBodyForFunction(ABCGenerator.java:347)
>   at 
> org.apache.flex.compiler.internal.as.codegen.ABCGenerator.generateFunction(ABCGenerator.java:262)
>   at 
> org.apache.flex.compiler.internal.as.codegen.ClassDirectiveProcessor.finishClassDefinition(ClassDirectiveProcessor.java:639)
>   at 
> org.apache.flex.compiler.internal.as.codegen.GlobalDirectiveProcessor.declareClass(GlobalDirectiveProcessor.java:430)
>   at 
> org.apache.flex.compiler.internal.as.codegen.DirectiveProcessor.processNode(DirectiveProcessor.java:206)
>   at 
> org.apache.flex.compiler.internal.as.codegen.DirectiveProcessor.traverse(DirectiveProcessor.java:188)
>   at 
> org.apache.flex.compiler.internal.as.codegen.GlobalDirectiveProcessor.declarePackage(GlobalDirectiveProcessor.java:455)
>   at 
> org.apache.flex.compiler.internal.as.codegen.DirectiveProcessor.processNode(DirectiveProcessor.java:223)
>   at 

Re: dual issues

2017-05-31 Thread Harbs
Josh,

VS Code is now reporting lots of errors in the Problems window. I’m guessing it 
does not know how to differentiate between JS and SWF builds using dual?

Is that something on your to-do list?

Thanks,
Harbs

> On Jun 1, 2017, at 5:10 AM, Harbs  wrote:
> 
> Bingo. Thanks!
> 
> SWF output still gets all kinds of errors, but the JS output is pretty error 
> free. I still have some fixing up to do before I can see how well it actually 
> works, but at least the compiler is not complaining now.
> 
>> On Jun 1, 2017, at 4:45 AM, Josh Tynjala  wrote:
>> 
>> Try replacing the js-output-type compiler option with:
>> 
>> "targets": ["JSFlex"]
>> 
>> - Josh
>> 
>> On May 31, 2017 6:26 PM, "Harbs"  wrote:
>> 
>>> I’m using asconfig in VSCode to compile with these settings:
>>>   "config": "flex",
>>>   "compilerOptions": {
>>>   "debug": false,
>>>   "js-output-type": "flexjs",
>>>   "source-map": false,
>>>   "library-path": [
>>>   "lib"
>>>   ],
>>> 
 On Jun 1, 2017, at 1:04 AM, Justin Mclean 
>>> wrote:
 
 HI,
 
> Am I missing something?
 
 Perhaps try JSFlex in your pom.xml? I believe the
>>> name changed from pre to post dual branch.
 
 Justin
 
>>> 
>>> 
> 



Re: dual issues

2017-05-31 Thread Harbs
Bingo. Thanks!

SWF output still gets all kinds of errors, but the JS output is pretty error 
free. I still have some fixing up to do before I can see how well it actually 
works, but at least the compiler is not complaining now.

> On Jun 1, 2017, at 4:45 AM, Josh Tynjala  wrote:
> 
> Try replacing the js-output-type compiler option with:
> 
> "targets": ["JSFlex"]
> 
> - Josh
> 
> On May 31, 2017 6:26 PM, "Harbs"  wrote:
> 
>> I’m using asconfig in VSCode to compile with these settings:
>>"config": "flex",
>>"compilerOptions": {
>>"debug": false,
>>"js-output-type": "flexjs",
>>"source-map": false,
>>"library-path": [
>>"lib"
>>],
>> 
>>> On Jun 1, 2017, at 1:04 AM, Justin Mclean 
>> wrote:
>>> 
>>> HI,
>>> 
 Am I missing something?
>>> 
>>> Perhaps try JSFlex in your pom.xml? I believe the
>> name changed from pre to post dual branch.
>>> 
>>> Justin
>>> 
>> 
>> 



Re: dual issues

2017-05-31 Thread Harbs
The examples I see seem to use COMPILE blocks.

I’m not sure how this translates to the app level. Is there a way to define a 
single method which overrides a SWF one and implements a new JS one (without 
using COMPILE blocks)? That seems to me like a pretty common use case for 
migrated apps.

> On Jun 1, 2017, at 2:18 AM, Alex Harui  wrote:
> 
> 
> 
> On 5/31/17, 2:38 PM, "Harbs"  > wrote:
> 
>> I just switched to dual and I’m getting lots of errors. These errors seem
>> to be exactly what I was afraid of, and I’m not sure how to resolve
>> without being restricted by naming of properties and methods.
>> 
>> 1. I’m using a mask setter and getter for images it’s now giving override
>> errors.
>> 2. contains() is an incompatible override.
>> 3. scaleX and scaleY
>> 4. blendMode
>> 5. rotation
>> 6. filters
>> 7. mouseEnabled
>> etc….
>> 
>> I thought there was supposed to be something built into the compiler to
>> hide the flash-specific APIs and allow reuse of them.
> 
> Not just in the compiler, but in metadata.  Search the source for
> [SWFOverride].  I guess I don't understand why you want/need to change the
> type of scaleX/Y, blendMode, etc.  Wouldn't mouseEnabled always be a
> boolean?
> 
> SWFOverride is designed for properties like mask and methods like
> contains() that are defined as a flash.display.DisplayObject by Flash and
> we probably want to use UIBase instead.  SWFOverride will work because
> UIBase is a DisplayObject on Flash.  I did not anticipate a requirement
> that mouseEnabled would be something other than a boolean.  What types are
> you using for these other properties?  Or maybe you just need COMPILE::JS
> on mouseEnabled?
> 
> HTH,
> -Alex



Re: dual issues

2017-05-31 Thread Justin Mclean
Hi,

> I’m using asconfig in VSCode to compile with these settings:
>   "config": "flex",
>   "compilerOptions": {
>   "debug": false,
>   "js-output-type": "flexjs",
>   "source-map": false,
>   "library-path": [
>   "lib"
>   ],


I’ve not used VSCode but perhaps try “JSFlex" rather than “flexjs" in there or 
perhaps “targets": “JSFlex"?

Justin

Re: dual issues

2017-05-31 Thread Josh Tynjala
Try replacing the js-output-type compiler option with:

"targets": ["JSFlex"]

- Josh

On May 31, 2017 6:26 PM, "Harbs"  wrote:

> I’m using asconfig in VSCode to compile with these settings:
> "config": "flex",
> "compilerOptions": {
> "debug": false,
> "js-output-type": "flexjs",
> "source-map": false,
> "library-path": [
> "lib"
> ],
>
> > On Jun 1, 2017, at 1:04 AM, Justin Mclean 
> wrote:
> >
> > HI,
> >
> >> Am I missing something?
> >
> > Perhaps try JSFlex in your pom.xml? I believe the
> name changed from pre to post dual branch.
> >
> > Justin
> >
>
>


Re: dual issues

2017-05-31 Thread Harbs
In case I wasn’t clear, I’m not outputting SWF — only JS output.

> On Jun 1, 2017, at 4:26 AM, Harbs  wrote:
> 
> I’m using asconfig in VSCode to compile with these settings:
> "config": "flex",
> "compilerOptions": {
> "debug": false,
> "js-output-type": "flexjs",
> "source-map": false,
> "library-path": [
> "lib"
> ],
> 
>> On Jun 1, 2017, at 1:04 AM, Justin Mclean > > wrote:
>> 
>> HI,
>> 
>>> Am I missing something?
>> 
>> Perhaps try JSFlex in your pom.xml? I believe the name 
>> changed from pre to post dual branch.
>> 
>> Justin
>> 
> 



Re: dual issues

2017-05-31 Thread Harbs
I’m using asconfig in VSCode to compile with these settings:
"config": "flex",
"compilerOptions": {
"debug": false,
"js-output-type": "flexjs",
"source-map": false,
"library-path": [
"lib"
],

> On Jun 1, 2017, at 1:04 AM, Justin Mclean  wrote:
> 
> HI,
> 
>> Am I missing something?
> 
> Perhaps try JSFlex in your pom.xml? I believe the name 
> changed from pre to post dual branch.
> 
> Justin
> 



Re: dual issues

2017-05-31 Thread Alex Harui


On 5/31/17, 2:38 PM, "Harbs"  wrote:

>I just switched to dual and I’m getting lots of errors. These errors seem
>to be exactly what I was afraid of, and I’m not sure how to resolve
>without being restricted by naming of properties and methods.
>
>1. I’m using a mask setter and getter for images it’s now giving override
>errors.
>2. contains() is an incompatible override.
>3. scaleX and scaleY
>4. blendMode
>5. rotation
>6. filters
>7. mouseEnabled
>etc….
>
>I thought there was supposed to be something built into the compiler to
>hide the flash-specific APIs and allow reuse of them.

Not just in the compiler, but in metadata.  Search the source for
[SWFOverride].  I guess I don't understand why you want/need to change the
type of scaleX/Y, blendMode, etc.  Wouldn't mouseEnabled always be a
boolean?

SWFOverride is designed for properties like mask and methods like
contains() that are defined as a flash.display.DisplayObject by Flash and
we probably want to use UIBase instead.  SWFOverride will work because
UIBase is a DisplayObject on Flash.  I did not anticipate a requirement
that mouseEnabled would be something other than a boolean.  What types are
you using for these other properties?  Or maybe you just need COMPILE::JS
on mouseEnabled?

HTH,
-Alex



dual issues

2017-05-31 Thread Harbs
I just switched to dual and I’m getting lots of errors. These errors seem to be 
exactly what I was afraid of, and I’m not sure how to resolve without being 
restricted by naming of properties and methods.

1. I’m using a mask setter and getter for images it’s now giving override 
errors.
2. contains() is an incompatible override.
3. scaleX and scaleY
4. blendMode
5. rotation
6. filters
7. mouseEnabled
etc….

I thought there was supposed to be something built into the compiler to hide 
the flash-specific APIs and allow reuse of them.

Am I missing something?

Thanks,
Harbs