[FlexJS] Compiler outputs (nearly) empty map file

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

[FlexJS] Compiler outputs (nearly) empty map file

Idylog - Nicolas Granon
We are trying to use FlexJS 0.8 with a Visual Studio Code (VSCode) setup
(nextgen actionscript extension).

Everything works fine. However, when we use the -source-map option of the
compiler (in the asconfig.json) a source map file is created ({project
name}.js.map) with the correct keys, but no values !

Here is a copy of the content of the {project name}.js.map :

{
"version":3,
"file":"myproject03.js",
"lineCount":1,
"mappings":";",
"sources":[],
"names":[]
}

I have understood that the map generated from MXML files should be named
.mxml.map. But this is not our concern (we can rename the file until this
small bug is fixed).

The problem is of course that the file is "empty".

The project consists of a single mxml file (with a button, a label and a
listener displaying an Alert, nothing very complicated !).
The listener is inside a script tag, of course, not inlined.
We have the latest version of VSCode (august 2017), the latest version of
NextGenAS extension (0.6.0).
The only specific (?) setting is that we use the --output argument since we
want to sent the compiled output to our web server (the output dir is one
level BELOW the web root but of course the output dir is specified as an
absolute windows path, not as a URL). And also we output JS only (--target
JSFlex).
The generated output in bin-debug runs fine...

What did we miss ?

Many thanks

Nicolas

Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] Compiler outputs (nearly) empty map file

Harbs
I’m not sure what the state of source maps for MXML files is. The last time I paid attention, it was not working.

Alex or Josh would have a better idea.

FWIW, I got into the habit of doing my debugging in Chrome…

Harbs

> On Sep 27, 2017, at 12:24 PM, Idylog - Nicolas Granon <[hidden email]> wrote:
>
> We are trying to use FlexJS 0.8 with a Visual Studio Code (VSCode) setup
> (nextgen actionscript extension).
>
> Everything works fine. However, when we use the -source-map option of the
> compiler (in the asconfig.json) a source map file is created ({project
> name}.js.map) with the correct keys, but no values !
>
> Here is a copy of the content of the {project name}.js.map :
>
> {
> "version":3,
> "file":"myproject03.js",
> "lineCount":1,
> "mappings":";",
> "sources":[],
> "names":[]
> }
>
> I have understood that the map generated from MXML files should be named
> .mxml.map. But this is not our concern (we can rename the file until this
> small bug is fixed).
>
> The problem is of course that the file is "empty".
>
> The project consists of a single mxml file (with a button, a label and a
> listener displaying an Alert, nothing very complicated !).
> The listener is inside a script tag, of course, not inlined.
> We have the latest version of VSCode (august 2017), the latest version of
> NextGenAS extension (0.6.0).
> The only specific (?) setting is that we use the --output argument since we
> want to sent the compiled output to our web server (the output dir is one
> level BELOW the web root but of course the output dir is specified as an
> absolute windows path, not as a URL). And also we output JS only (--target
> JSFlex).
> The generated output in bin-debug runs fine...
>
> What did we miss ?
>
> Many thanks
>
> Nicolas
>

Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] Compiler outputs (nearly) empty map file

Yishay Weiss
In reply to this post by Idylog - Nicolas Granon
I think this should be fixed in 0.9



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] Compiler outputs (nearly) empty map file

Yishay Weiss
Grab the nightly to try it now. You can do that in the installer by right
clicking on the home screen and choosing 'show dev builds', and the
selecting 'Apache FlexJS Nightly'.
.



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

RE: [FlexJS] Compiler outputs (nearly) empty map file

Idylog - Nicolas Granon
Hi Yishay,

Thank you for your help.
We do not use the installer because it does not work on our workstations (we
have AIR 26 installed). It hangs at the 4th step if I remember correctly.
I remind reading somewhere that there is an issue with the installer.
We used the command-line method.

Many thanks

Nicolas Granon



> -----Message d'origine-----
> De : Yishay Weiss [mailto:[hidden email]]
> Envoyé : mercredi 27 septembre 2017 12:58
> À : [hidden email]
> Objet : Re: [FlexJS] Compiler outputs (nearly) empty map file
>
> Grab the nightly to try it now. You can do that in the installer by
> right clicking on the home screen and choosing 'show dev builds', and
> the selecting 'Apache FlexJS Nightly'.
> .
>
>
>
> --
> Sent from: http://apache-flex-users.2333346.n4.nabble.com/

Reply | Threaded
Open this post in threaded view
|

RE: [FlexJS] Compiler outputs (nearly) empty map file

Idylog - Nicolas Granon
In reply to this post by Harbs
Hi, Harbs

Josh made a very convincing demo (the video is on nextgen actionscript web site) in july. He was using an mxml source file just like out test file.
That is why I thought it was fully implemented by now.

We will make some more test to check if the problem is related to outputting outside of the workspace.

About the debug-browser choice : yes, I understand that Chrome debugging may be "better" than Firefox debugging, but at this time it doesn’t matter very much since the .map file is empty anyway...
We will of course evaluate the quality of the browser debug plug-in (sorry : "extension") in the course of our evaluation process. At first sight, it seems that the Chrome debug extension is more mature...

Many thanks

Nicolas Granon




> -----Message d'origine-----
> De : Harbs [mailto:[hidden email]]
> Envoyé : mercredi 27 septembre 2017 11:29
> À : [hidden email]; [hidden email]
> Objet : Re: [FlexJS] Compiler outputs (nearly) empty map file
>
> I’m not sure what the state of source maps for MXML files is. The last
> time I paid attention, it was not working.
>
> Alex or Josh would have a better idea.
>
> FWIW, I got into the habit of doing my debugging in Chrome…
>
> Harbs
>
> > On Sep 27, 2017, at 12:24 PM, Idylog - Nicolas Granon
> <[hidden email]> wrote:
> >
> > We are trying to use FlexJS 0.8 with a Visual Studio Code (VSCode)
> > setup (nextgen actionscript extension).
> >
> > Everything works fine. However, when we use the -source-map option of
> > the compiler (in the asconfig.json) a source map file is created
> > ({project
> > name}.js.map) with the correct keys, but no values !
> >
> > Here is a copy of the content of the {project name}.js.map :
> >
> > {
> > "version":3,
> > "file":"myproject03.js",
> > "lineCount":1,
> > "mappings":";",
> > "sources":[],
> > "names":[]
> > }
> >
> > I have understood that the map generated from MXML files should be
> > named .mxml.map. But this is not our concern (we can rename the file
> > until this small bug is fixed).
> >
> > The problem is of course that the file is "empty".
> >
> > The project consists of a single mxml file (with a button, a label
> and
> > a listener displaying an Alert, nothing very complicated !).
> > The listener is inside a script tag, of course, not inlined.
> > We have the latest version of VSCode (august 2017), the latest
> version
> > of NextGenAS extension (0.6.0).
> > The only specific (?) setting is that we use the --output argument
> > since we want to sent the compiled output to our web server (the
> > output dir is one level BELOW the web root but of course the output
> > dir is specified as an absolute windows path, not as a URL). And also
> > we output JS only (--target JSFlex).
> > The generated output in bin-debug runs fine...
> >
> > What did we miss ?
> >
> > Many thanks
> >
> > Nicolas
> >


Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] Compiler outputs (nearly) empty map file

Alex Harui-2
In reply to this post by Idylog - Nicolas Granon
Nightly builds are also available for command-line (Ant) install here:

http://apacheflexbuild.cloudapp.net:8080/job/flex-asjs/lastSuccessfulBuild/
artifact/out/

Use an artifact ending with -bin.tar.gz or -bin.zip.

HTH,
-Alex

On 9/27/17, 10:41 AM, "Idylog - Nicolas Granon" <[hidden email]> wrote:

>Hi Yishay,
>
>Thank you for your help.
>We do not use the installer because it does not work on our workstations
>(we
>have AIR 26 installed). It hangs at the 4th step if I remember correctly.
>I remind reading somewhere that there is an issue with the installer.
>We used the command-line method.
>
>Many thanks
>
>Nicolas Granon
>
>
>
>> -----Message d'origine-----
>> De : Yishay Weiss [mailto:[hidden email]]
>> Envoyé : mercredi 27 septembre 2017 12:58
>> À : [hidden email]
>> Objet : Re: [FlexJS] Compiler outputs (nearly) empty map file
>>
>> Grab the nightly to try it now. You can do that in the installer by
>> right clicking on the home screen and choosing 'show dev builds', and
>> the selecting 'Apache FlexJS Nightly'.
>> .
>>
>>
>>
>> --
>> Sent from:
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fl
>>ex-users.2333346.n4.nabble.com%2F&data=02%7C01%7C%7C40ee768fd2624adb34820
>>8d505cf04ce%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6364213090580631
>>31&sdata=14NS0kJ8ArDUDuCKvKqPyymFIwTgrXaD3Gh1RQaLQJ0%3D&reserved=0
>

Reply | Threaded
Open this post in threaded view
|

RE: [FlexJS] Compiler outputs (nearly) empty map file

Idylog - Nicolas Granon
If we remove the --output options from compiler options, the generated .map file contains "mappings" values and also a "sources" values. The "lineCount" also contains a value. The "files" property also looks correct, and references the mxml source file.
We did not test debug functionality with this output (we did not test if the mappings are correct)

To me, it looks like the map generation process does not fully "follow" the "output" argument. The "skeleton" file creation process correctly creates the file in the --output dir, but "map feeding" process does not.

Nicolas Granon



> -----Message d'origine-----
> De : Alex Harui [mailto:[hidden email]]
> Envoyé : mercredi 27 septembre 2017 20:06
> À : [hidden email]; [hidden email]
> Objet : Re: [FlexJS] Compiler outputs (nearly) empty map file
>
> Nightly builds are also available for command-line (Ant) install here:
>
> http://apacheflexbuild.cloudapp.net:8080/job/flex-
> asjs/lastSuccessfulBuild/
> artifact/out/
>
> Use an artifact ending with -bin.tar.gz or -bin.zip.
>
> HTH,
> -Alex
>
> On 9/27/17, 10:41 AM, "Idylog - Nicolas Granon" <[hidden email]>
> wrote:
>
> >Hi Yishay,
> >
> >Thank you for your help.
> >We do not use the installer because it does not work on our
> workstations
> >(we
> >have AIR 26 installed). It hangs at the 4th step if I remember
> correctly.
> >I remind reading somewhere that there is an issue with the installer.
> >We used the command-line method.
> >
> >Many thanks
> >
> >Nicolas Granon
> >
> >
> >
> >> -----Message d'origine-----
> >> De : Yishay Weiss [mailto:[hidden email]]
> >> Envoyé : mercredi 27 septembre 2017 12:58
> >> À : [hidden email]
> >> Objet : Re: [FlexJS] Compiler outputs (nearly) empty map file
> >>
> >> Grab the nightly to try it now. You can do that in the installer by
> >> right clicking on the home screen and choosing 'show dev builds',
> and
> >> the selecting 'Apache FlexJS Nightly'.
> >> .
> >>
> >>
> >>
> >> --
> >> Sent from:
> >>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapach
> e-fl
> >>ex-
> users.2333346.n4.nabble.com%2F&data=02%7C01%7C%7C40ee768fd2624adb34820
> >>8d505cf04ce%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636421309058
> 0631
> >>31&sdata=14NS0kJ8ArDUDuCKvKqPyymFIwTgrXaD3Gh1RQaLQJ0%3D&reserved=0
> >


Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] Compiler outputs (nearly) empty map file

piotrz
In reply to this post by Idylog - Nicolas Granon
Hi Nicolas,

Yes there is problem with installer, but if you don't care about what
version of Adobe Air/Flash are you using in FlexJS development you can
install without the problem nightly build with Flash Player 23.

Piotr

2017-09-27 19:41 GMT+02:00 Idylog - Nicolas Granon <[hidden email]>:

> Hi Yishay,
>
> Thank you for your help.
> We do not use the installer because it does not work on our workstations
> (we
> have AIR 26 installed). It hangs at the 4th step if I remember correctly.
> I remind reading somewhere that there is an issue with the installer.
> We used the command-line method.
>
> Many thanks
>
> Nicolas Granon
>
>
>
> > -----Message d'origine-----
> > De : Yishay Weiss [mailto:[hidden email]]
> > Envoyé : mercredi 27 septembre 2017 12:58
> > À : [hidden email]
> > Objet : Re: [FlexJS] Compiler outputs (nearly) empty map file
> >
> > Grab the nightly to try it now. You can do that in the installer by
> > right clicking on the home screen and choosing 'show dev builds', and
> > the selecting 'Apache FlexJS Nightly'.
> > .
> >
> >
> >
> > --
> > Sent from: http://apache-flex-users.2333346.n4.nabble.com/
>
>


--

Piotr Zarzycki

mobile: +48 880 859 557
skype: zarzycki10

LinkedIn: http://www.linkedin.com/piotrzarzycki
<https://pl.linkedin.com/in/piotr-zarzycki-92a53552>

GitHub: https://github.com/piotrzarzycki21
Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] Compiler outputs (nearly) empty map file

Josh Tynjala-2
In reply to this post by Idylog - Nicolas Granon
Hi Nicolas,

I just gave it a try on my machine with FlexJS 0.8, and source map file contained the correct information for the functions in the <fx:Script> tag when I set the source-map option to true and provided a custom output path. I tried both absolute and relative output paths, and the contents of the .map file were correct in all cases. The "sources" field of the .map file even had different paths back to the .mxml file, depending on where it had been output. I'm on macOS, but I'll make sure to test on Windows too.

I noticed that you mentioned sending the output to a web server. Is this on the same drive that your workspace is saved, or are you outputting to another drive or somewhere else that might be unconventional?

Can you share the complete output from the compiler?

Can you also share the contents of myproject03.mxml and asconfig.json?

These might provide some clues that will help me figure out how to reproduce the issue. Thanks!

Note: As others have mentioned, the .js.map file name issue is indeed fixed. If you use a nightly build, the file name properly ends with .mxml.map instead of .js.map. However, it's worth noting that it should work without any file name changes if you debug in Visual Studio Code using the Chrome browser. At least, that was the case the last time that I tried.

- Josh

On 2017-09-27 02:24, "Idylog - Nicolas Granon" <[hidden email]> wrote:

> We are trying to use FlexJS 0.8 with a Visual Studio Code (VSCode) setup
> (nextgen actionscript extension).
>
> Everything works fine. However, when we use the -source-map option of the
> compiler (in the asconfig.json) a source map file is created ({project
> name}.js.map) with the correct keys, but no values !
>
> Here is a copy of the content of the {project name}.js.map :
>
> {
> "version":3,
> "file":"myproject03.js",
> "lineCount":1,
> "mappings":";",
> "sources":[],
> "names":[]
> }
>
> I have understood that the map generated from MXML files should be named
> .mxml.map. But this is not our concern (we can rename the file until this
> small bug is fixed).
>
> The problem is of course that the file is "empty".
>
> The project consists of a single mxml file (with a button, a label and a
> listener displaying an Alert, nothing very complicated !).
> The listener is inside a script tag, of course, not inlined.
> We have the latest version of VSCode (august 2017), the latest version of
> NextGenAS extension (0.6.0).
> The only specific (?) setting is that we use the --output argument since we
> want to sent the compiled output to our web server (the output dir is one
> level BELOW the web root but of course the output dir is specified as an
> absolute windows path, not as a URL). And also we output JS only (--target
> JSFlex).
> The generated output in bin-debug runs fine...
>
> What did we miss ?
>
> Many thanks
>
> Nicolas
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] Compiler outputs (nearly) empty map file

Josh Tynjala-2
I gave it a try on Windows, and I can reproduce the issue. It specifically seems to be related to passing an absolute path to the output compiler option. When I use a relative path instead, it shows the correct content inside the .map file. I'll need to investigate further to figure out exactly why this is happening.

- Josh

On 2017-09-28 14:06, "Josh Tynjala"<[hidden email]> wrote:

> Hi Nicolas,
>
> I just gave it a try on my machine with FlexJS 0.8, and source map file contained the correct information for the functions in the <fx:Script> tag when I set the source-map option to true and provided a custom output path. I tried both absolute and relative output paths, and the contents of the .map file were correct in all cases. The "sources" field of the .map file even had different paths back to the .mxml file, depending on where it had been output. I'm on macOS, but I'll make sure to test on Windows too.
>
> I noticed that you mentioned sending the output to a web server. Is this on the same drive that your workspace is saved, or are you outputting to another drive or somewhere else that might be unconventional?
>
> Can you share the complete output from the compiler?
>
> Can you also share the contents of myproject03.mxml and asconfig.json?
>
> These might provide some clues that will help me figure out how to reproduce the issue. Thanks!
>
> Note: As others have mentioned, the .js.map file name issue is indeed fixed. If you use a nightly build, the file name properly ends with .mxml.map instead of .js.map. However, it's worth noting that it should work without any file name changes if you debug in Visual Studio Code using the Chrome browser. At least, that was the case the last time that I tried.
>
> - Josh
>
> On 2017-09-27 02:24, "Idylog - Nicolas Granon" <[hidden email]> wrote:
> > We are trying to use FlexJS 0.8 with a Visual Studio Code (VSCode) setup
> > (nextgen actionscript extension).
> >
> > Everything works fine. However, when we use the -source-map option of the
> > compiler (in the asconfig.json) a source map file is created ({project
> > name}.js.map) with the correct keys, but no values !
> >
> > Here is a copy of the content of the {project name}.js.map :
> >
> > {
> > "version":3,
> > "file":"myproject03.js",
> > "lineCount":1,
> > "mappings":";",
> > "sources":[],
> > "names":[]
> > }
> >
> > I have understood that the map generated from MXML files should be named
> > .mxml.map. But this is not our concern (we can rename the file until this
> > small bug is fixed).
> >
> > The problem is of course that the file is "empty".
> >
> > The project consists of a single mxml file (with a button, a label and a
> > listener displaying an Alert, nothing very complicated !).
> > The listener is inside a script tag, of course, not inlined.
> > We have the latest version of VSCode (august 2017), the latest version of
> > NextGenAS extension (0.6.0).
> > The only specific (?) setting is that we use the --output argument since we
> > want to sent the compiled output to our web server (the output dir is one
> > level BELOW the web root but of course the output dir is specified as an
> > absolute windows path, not as a URL). And also we output JS only (--target
> > JSFlex).
> > The generated output in bin-debug runs fine...
> >
> > What did we miss ?
> >
> > Many thanks
> >
> > Nicolas
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

RE: [FlexJS] Compiler outputs (nearly) empty map file

Idylog - Nicolas Granon
In reply to this post by Josh Tynjala-2
Hi Josh,

Thank you for your answer.

The "web server" is installed locally.
In the compiler arguments, it is just a directory path outside the workspace
with an absolute path (c:/etc.).
And yes, the drive is the same.

Is it possible that forward slashes or backward slashes make a difference ?
(I have the habit of using forward slashes, even on Windows, if it is
accepted)

I have no problem sharing the compiler output but it's midnight now here ! I
will do this tomorrow if you don't mind...

The mxml (sole) file content is quite simple and I tried to stick to your
demo at FlexCon.

Should I sent the output file to the mailing list or to another address ?
(no problem for me for sending public. It's only a basic test !!)

Thanks again,

Nicolas Granon




> -----Message d'origine-----
> De : Josh Tynjala [mailto:[hidden email]]
> Envoyé : jeudi 28 septembre 2017 23:06
> À : [hidden email]
> Objet : Re: [FlexJS] Compiler outputs (nearly) empty map file
>
> Hi Nicolas,
>
> I just gave it a try on my machine with FlexJS 0.8, and source map file
> contained the correct information for the functions in the <fx:Script>
> tag when I set the source-map option to true and provided a custom
> output path. I tried both absolute and relative output paths, and the
> contents of the .map file were correct in all cases. The "sources"
> field of the .map file even had different paths back to the .mxml file,
> depending on where it had been output. I'm on macOS, but I'll make sure
> to test on Windows too.
>
> I noticed that you mentioned sending the output to a web server. Is
> this on the same drive that your workspace is saved, or are you
> outputting to another drive or somewhere else that might be
> unconventional?
>
> Can you share the complete output from the compiler?
>
> Can you also share the contents of myproject03.mxml and asconfig.json?
>
> These might provide some clues that will help me figure out how to
> reproduce the issue. Thanks!
>
> Note: As others have mentioned, the .js.map file name issue is indeed
> fixed. If you use a nightly build, the file name properly ends with
> .mxml.map instead of .js.map. However, it's worth noting that it should
> work without any file name changes if you debug in Visual Studio Code
> using the Chrome browser. At least, that was the case the last time
> that I tried.
>
> - Josh
>
> On 2017-09-27 02:24, "Idylog - Nicolas Granon" <[hidden email]>
> wrote:
> > We are trying to use FlexJS 0.8 with a Visual Studio Code (VSCode)
> > setup (nextgen actionscript extension).
> >
> > Everything works fine. However, when we use the -source-map option of
> > the compiler (in the asconfig.json) a source map file is created
> > ({project
> > name}.js.map) with the correct keys, but no values !
> >
> > Here is a copy of the content of the {project name}.js.map :
> >
> > {
> > "version":3,
> > "file":"myproject03.js",
> > "lineCount":1,
> > "mappings":";",
> > "sources":[],
> > "names":[]
> > }
> >
> > I have understood that the map generated from MXML files should be
> > named .mxml.map. But this is not our concern (we can rename the file
> > until this small bug is fixed).
> >
> > The problem is of course that the file is "empty".
> >
> > The project consists of a single mxml file (with a button, a label
> and
> > a listener displaying an Alert, nothing very complicated !).
> > The listener is inside a script tag, of course, not inlined.
> > We have the latest version of VSCode (august 2017), the latest
> version
> > of NextGenAS extension (0.6.0).
> > The only specific (?) setting is that we use the --output argument
> > since we want to sent the compiled output to our web server (the
> > output dir is one level BELOW the web root but of course the output
> > dir is specified as an absolute windows path, not as a URL). And also
> > we output JS only (--target JSFlex).
> > The generated output in bin-debug runs fine...
> >
> > What did we miss ?
> >
> > Many thanks
> >
> > Nicolas
> >
> >

Reply | Threaded
Open this post in threaded view
|

Re: RE: [FlexJS] Compiler outputs (nearly) empty map file

Josh Tynjala-2
Hey Nicolas,

Okay, I figured out the bug, and I think I have it fixed. No need to share your code or compiler output anymore! Once the next nightly build finishes, you should be able to download it to get the fix.

It turned out to be a case sensitivity issue. I was able to reproduce the issue when I typed the Windows drive letter in uppercase when I set the output compiler option to an absolute path. The compiler seemed to be expecting lowercase instead when it was doing some equality checks. Slashes were actually not a problem. It looks like Java is correctly switching everything to backslash on Windows

If you don't want to update to a nightly build, you should be able to workaround the issue instead. Play around with the absolute path that you pass to the output compiler option. It could be as simple as changing the case of the drive letter (if it's uppercase, try lowercase... or if it's lowercase, try uppercase). If that doesn't work, you might also need to check that you're using the correct case of any directory names in the path too.

- Josh

On 2017-09-28 15:04, "Idylog - Nicolas Granon" <[hidden email]> wrote:

> Hi Josh,
>
> Thank you for your answer.
>
> The "web server" is installed locally.
> In the compiler arguments, it is just a directory path outside the workspace
> with an absolute path (c:/etc.).
> And yes, the drive is the same.
>
> Is it possible that forward slashes or backward slashes make a difference ?
> (I have the habit of using forward slashes, even on Windows, if it is
> accepted)
>
> I have no problem sharing the compiler output but it's midnight now here ! I
> will do this tomorrow if you don't mind...
>
> The mxml (sole) file content is quite simple and I tried to stick to your
> demo at FlexCon.
>
> Should I sent the output file to the mailing list or to another address ?
> (no problem for me for sending public. It's only a basic test !!)
>
> Thanks again,
>
> Nicolas Granon
>
>
>
>
> > -----Message d'origine-----
> > De : Josh Tynjala [mailto:[hidden email]]
> > Envoyé : jeudi 28 septembre 2017 23:06
> > À : [hidden email]
> > Objet : Re: [FlexJS] Compiler outputs (nearly) empty map file
> >
> > Hi Nicolas,
> >
> > I just gave it a try on my machine with FlexJS 0.8, and source map file
> > contained the correct information for the functions in the <fx:Script>
> > tag when I set the source-map option to true and provided a custom
> > output path. I tried both absolute and relative output paths, and the
> > contents of the .map file were correct in all cases. The "sources"
> > field of the .map file even had different paths back to the .mxml file,
> > depending on where it had been output. I'm on macOS, but I'll make sure
> > to test on Windows too.
> >
> > I noticed that you mentioned sending the output to a web server. Is
> > this on the same drive that your workspace is saved, or are you
> > outputting to another drive or somewhere else that might be
> > unconventional?
> >
> > Can you share the complete output from the compiler?
> >
> > Can you also share the contents of myproject03.mxml and asconfig.json?
> >
> > These might provide some clues that will help me figure out how to
> > reproduce the issue. Thanks!
> >
> > Note: As others have mentioned, the .js.map file name issue is indeed
> > fixed. If you use a nightly build, the file name properly ends with
> > .mxml.map instead of .js.map. However, it's worth noting that it should
> > work without any file name changes if you debug in Visual Studio Code
> > using the Chrome browser. At least, that was the case the last time
> > that I tried.
> >
> > - Josh
> >
> > On 2017-09-27 02:24, "Idylog - Nicolas Granon" <[hidden email]>
> > wrote:
> > > We are trying to use FlexJS 0.8 with a Visual Studio Code (VSCode)
> > > setup (nextgen actionscript extension).
> > >
> > > Everything works fine. However, when we use the -source-map option of
> > > the compiler (in the asconfig.json) a source map file is created
> > > ({project
> > > name}.js.map) with the correct keys, but no values !
> > >
> > > Here is a copy of the content of the {project name}.js.map :
> > >
> > > {
> > > "version":3,
> > > "file":"myproject03.js",
> > > "lineCount":1,
> > > "mappings":";",
> > > "sources":[],
> > > "names":[]
> > > }
> > >
> > > I have understood that the map generated from MXML files should be
> > > named .mxml.map. But this is not our concern (we can rename the file
> > > until this small bug is fixed).
> > >
> > > The problem is of course that the file is "empty".
> > >
> > > The project consists of a single mxml file (with a button, a label
> > and
> > > a listener displaying an Alert, nothing very complicated !).
> > > The listener is inside a script tag, of course, not inlined.
> > > We have the latest version of VSCode (august 2017), the latest
> > version
> > > of NextGenAS extension (0.6.0).
> > > The only specific (?) setting is that we use the --output argument
> > > since we want to sent the compiled output to our web server (the
> > > output dir is one level BELOW the web root but of course the output
> > > dir is specified as an absolute windows path, not as a URL). And also
> > > we output JS only (--target JSFlex).
> > > The generated output in bin-debug runs fine...
> > >
> > > What did we miss ?
> > >
> > > Many thanks
> > >
> > > Nicolas
> > >
> > >
>
>
Reply | Threaded
Open this post in threaded view
|

RE: [FlexJS] Compiler outputs (nearly) empty map file

Idylog - Nicolas Granon
In reply to this post by Josh Tynjala-2
Glad you could reproduce the issue !

As we say here (approximate translation) : "Repetition is the first step in
understanding".

Thank you

Nicolas Granon




> -----Message d'origine-----
> De : Josh Tynjala [mailto:[hidden email]]
> Envoyé : jeudi 28 septembre 2017 23:58
> À : [hidden email]
> Objet : Re: [FlexJS] Compiler outputs (nearly) empty map file
>
> I gave it a try on Windows, and I can reproduce the issue. It
> specifically seems to be related to passing an absolute path to the
> output compiler option. When I use a relative path instead, it shows
> the correct content inside the .map file. I'll need to investigate
> further to figure out exactly why this is happening.
>
> - Josh
>
> On 2017-09-28 14:06, "Josh Tynjala"<[hidden email]> wrote:
> > Hi Nicolas,
> >
> > I just gave it a try on my machine with FlexJS 0.8, and source map
> file contained the correct information for the functions in the
> <fx:Script> tag when I set the source-map option to true and provided a
> custom output path. I tried both absolute and relative output paths,
> and the contents of the .map file were correct in all cases. The
> "sources" field of the .map file even had different paths back to the
> .mxml file, depending on where it had been output. I'm on macOS, but
> I'll make sure to test on Windows too.
> >
> > I noticed that you mentioned sending the output to a web server. Is
> this on the same drive that your workspace is saved, or are you
> outputting to another drive or somewhere else that might be
> unconventional?
> >
> > Can you share the complete output from the compiler?
> >
> > Can you also share the contents of myproject03.mxml and
> asconfig.json?
> >
> > These might provide some clues that will help me figure out how to
> reproduce the issue. Thanks!
> >
> > Note: As others have mentioned, the .js.map file name issue is indeed
> fixed. If you use a nightly build, the file name properly ends with
> .mxml.map instead of .js.map. However, it's worth noting that it should
> work without any file name changes if you debug in Visual Studio Code
> using the Chrome browser. At least, that was the case the last time
> that I tried.
> >
> > - Josh
> >
> > On 2017-09-27 02:24, "Idylog - Nicolas Granon" <[hidden email]>
> wrote:
> > > We are trying to use FlexJS 0.8 with a Visual Studio Code (VSCode)
> > > setup (nextgen actionscript extension).
> > >
> > > Everything works fine. However, when we use the -source-map option
> > > of the compiler (in the asconfig.json) a source map file is created
> > > ({project
> > > name}.js.map) with the correct keys, but no values !
> > >
> > > Here is a copy of the content of the {project name}.js.map :
> > >
> > > {
> > > "version":3,
> > > "file":"myproject03.js",
> > > "lineCount":1,
> > > "mappings":";",
> > > "sources":[],
> > > "names":[]
> > > }
> > >
> > > I have understood that the map generated from MXML files should be
> > > named .mxml.map. But this is not our concern (we can rename the
> file
> > > until this small bug is fixed).
> > >
> > > The problem is of course that the file is "empty".
> > >
> > > The project consists of a single mxml file (with a button, a label
> > > and a listener displaying an Alert, nothing very complicated !).
> > > The listener is inside a script tag, of course, not inlined.
> > > We have the latest version of VSCode (august 2017), the latest
> > > version of NextGenAS extension (0.6.0).
> > > The only specific (?) setting is that we use the --output argument
> > > since we want to sent the compiled output to our web server (the
> > > output dir is one level BELOW the web root but of course the output
> > > dir is specified as an absolute windows path, not as a URL). And
> > > also we output JS only (--target JSFlex).
> > > The generated output in bin-debug runs fine...
> > >
> > > What did we miss ?
> > >
> > > Many thanks
> > >
> > > Nicolas
> > >
> > >
> >

Reply | Threaded
Open this post in threaded view
|

RE: RE: [FlexJS] Compiler outputs (nearly) empty map file

Idylog - Nicolas Granon
In reply to this post by Josh Tynjala-2
Many thanks !

It is amazing when you realize it is 2017, and we still do not have "smart" string comparison libraries...!!! (but we have 4K videos on smartphones and face recognition and TouchId and contactless credit cards and GPS-aware watches...)

While you are at it, may I suggest that you check that directory names (or file names) containing accented characters (like "é", "ù", "ñ" or even uppercase accented characters) are correctly handled ?

Thanks again,

Nicolas Granon




> -----Message d'origine-----
> De : Josh Tynjala [mailto:[hidden email]]
> Envoyé : vendredi 29 septembre 2017 00:44
> À : [hidden email]
> Objet : Re: RE: [FlexJS] Compiler outputs (nearly) empty map file
>
> Hey Nicolas,
>
> Okay, I figured out the bug, and I think I have it fixed. No need to
> share your code or compiler output anymore! Once the next nightly build
> finishes, you should be able to download it to get the fix.
>
> It turned out to be a case sensitivity issue. I was able to reproduce
> the issue when I typed the Windows drive letter in uppercase when I set
> the output compiler option to an absolute path. The compiler seemed to
> be expecting lowercase instead when it was doing some equality checks.
> Slashes were actually not a problem. It looks like Java is correctly
> switching everything to backslash on Windows
>
> If you don't want to update to a nightly build, you should be able to
> workaround the issue instead. Play around with the absolute path that
> you pass to the output compiler option. It could be as simple as
> changing the case of the drive letter (if it's uppercase, try
> lowercase... or if it's lowercase, try uppercase). If that doesn't
> work, you might also need to check that you're using the correct case
> of any directory names in the path too.
>
> - Josh
>
> On 2017-09-28 15:04, "Idylog - Nicolas Granon" <[hidden email]>
> wrote:
> > Hi Josh,
> >
> > Thank you for your answer.
> >
> > The "web server" is installed locally.
> > In the compiler arguments, it is just a directory path outside the
> > workspace with an absolute path (c:/etc.).
> > And yes, the drive is the same.
> >
> > Is it possible that forward slashes or backward slashes make a
> difference ?
> > (I have the habit of using forward slashes, even on Windows, if it is
> > accepted)
> >
> > I have no problem sharing the compiler output but it's midnight now
> > here ! I will do this tomorrow if you don't mind...
> >
> > The mxml (sole) file content is quite simple and I tried to stick to
> > your demo at FlexCon.
> >
> > Should I sent the output file to the mailing list or to another
> address ?
> > (no problem for me for sending public. It's only a basic test !!)
> >
> > Thanks again,
> >
> > Nicolas Granon
> >
> >
> >
> >
> > > -----Message d'origine-----
> > > De : Josh Tynjala [mailto:[hidden email]] Envoyé : jeudi
> > > 28 septembre 2017 23:06 À : [hidden email] Objet : Re:
> > > [FlexJS] Compiler outputs (nearly) empty map file
> > >
> > > Hi Nicolas,
> > >
> > > I just gave it a try on my machine with FlexJS 0.8, and source map
> > > file contained the correct information for the functions in the
> > > <fx:Script> tag when I set the source-map option to true and
> > > provided a custom output path. I tried both absolute and relative
> > > output paths, and the contents of the .map file were correct in all
> cases. The "sources"
> > > field of the .map file even had different paths back to the .mxml
> > > file, depending on where it had been output. I'm on macOS, but I'll
> > > make sure to test on Windows too.
> > >
> > > I noticed that you mentioned sending the output to a web server. Is
> > > this on the same drive that your workspace is saved, or are you
> > > outputting to another drive or somewhere else that might be
> > > unconventional?
> > >
> > > Can you share the complete output from the compiler?
> > >
> > > Can you also share the contents of myproject03.mxml and
> asconfig.json?
> > >
> > > These might provide some clues that will help me figure out how to
> > > reproduce the issue. Thanks!
> > >
> > > Note: As others have mentioned, the .js.map file name issue is
> > > indeed fixed. If you use a nightly build, the file name properly
> > > ends with .mxml.map instead of .js.map. However, it's worth noting
> > > that it should work without any file name changes if you debug in
> > > Visual Studio Code using the Chrome browser. At least, that was the
> > > case the last time that I tried.
> > >
> > > - Josh
> > >
> > > On 2017-09-27 02:24, "Idylog - Nicolas Granon" <[hidden email]>
> > > wrote:
> > > > We are trying to use FlexJS 0.8 with a Visual Studio Code
> (VSCode)
> > > > setup (nextgen actionscript extension).
> > > >
> > > > Everything works fine. However, when we use the -source-map
> option
> > > > of the compiler (in the asconfig.json) a source map file is
> > > > created ({project
> > > > name}.js.map) with the correct keys, but no values !
> > > >
> > > > Here is a copy of the content of the {project name}.js.map :
> > > >
> > > > {
> > > > "version":3,
> > > > "file":"myproject03.js",
> > > > "lineCount":1,
> > > > "mappings":";",
> > > > "sources":[],
> > > > "names":[]
> > > > }
> > > >
> > > > I have understood that the map generated from MXML files should
> be
> > > > named .mxml.map. But this is not our concern (we can rename the
> > > > file until this small bug is fixed).
> > > >
> > > > The problem is of course that the file is "empty".
> > > >
> > > > The project consists of a single mxml file (with a button, a
> label
> > > and
> > > > a listener displaying an Alert, nothing very complicated !).
> > > > The listener is inside a script tag, of course, not inlined.
> > > > We have the latest version of VSCode (august 2017), the latest
> > > version
> > > > of NextGenAS extension (0.6.0).
> > > > The only specific (?) setting is that we use the --output
> argument
> > > > since we want to sent the compiled output to our web server (the
> > > > output dir is one level BELOW the web root but of course the
> > > > output dir is specified as an absolute windows path, not as a
> > > > URL). And also we output JS only (--target JSFlex).
> > > > The generated output in bin-debug runs fine...
> > > >
> > > > What did we miss ?
> > > >
> > > > Many thanks
> > > >
> > > > Nicolas
> > > >
> > > >
> >
> >

Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] Compiler outputs (nearly) empty map file

Dave Fisher
Hi

Sent from my iPhone

> On Sep 28, 2017, at 4:15 PM, Idylog - Nicolas Granon <[hidden email]> wrote:
>
> Many thanks !
>
> It is amazing when you realize it is 2017, and we still do not have "smart" string comparison libraries...!!!

Actually Apache Lucene and Solr do handle stemming and provide good comparison tools for strings. Such libraries are pretty beefy and work with a corpus. They tend to be server side. Really this is the future... AI

Regards,
Dave