New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the workflow under Windows. #9

Open
rluble opened this Issue Nov 14, 2018 · 9 comments

Comments

Projects
None yet
5 participants
@rluble
Copy link
Collaborator

rluble commented Nov 14, 2018

The current release does not work under Windows.

There are a few known issues:

  1. bazel and all the required dependencies are cumbersome to setup in Windows.
  2. some path handling in J2CL does not work well with windows paths.

Detailed documentation on how to setup under Windows would be very helpful and address the first point.

For now we recommend to use WSL under Windows 10.

@markposterone

This comment has been minimized.

Copy link

markposterone commented Nov 15, 2018

WSL is not an option for us, we are not permitted to install something like that and also we are on Win7 not 10. We do not have any experience with Basel so it looks like we will have to wait until this issue has been resolved :-(
Does anyone have any plans to make this work with Maven or any other tool that works everywhere or it really can work only with Basel ?

@tbroyer

This comment has been minimized.

Copy link
Contributor

tbroyer commented Nov 15, 2018

Does anyone have any plans to make this work with Maven or any other tool that works everywhere or it really can work only with Basel ?

The GWT Community has started work on Maven and Gradle plugins. They are designed towards GWT 3 though, not "pure J2Cl".

@vojkog

This comment has been minimized.

Copy link

vojkog commented Nov 15, 2018

Detailed documentation on how to setup under Windows would be very helpful and address the first point.

As a start, I can describe my WIN 10 Bazel setup based on Using Bazel on Windows.

Would external-link to "md file" be useful?

@markposterone

This comment has been minimized.

Copy link

markposterone commented Nov 15, 2018

@vojkog Did you try everything explained in README.md of J2CL ? If yes, was everything successful on Win 10 for you or not ?

@vojkog

This comment has been minimized.

Copy link

vojkog commented Nov 15, 2018

@markposterone

This comment has been minimized.

Copy link

markposterone commented Nov 30, 2018

Basel is possible to install on Windows as pointed by @vojkog. The GWT community is working hard on Maven but it seams that nobody is looking into "some path handling in J2CL does not work well with windows paths" as they expect that creators of J2CL will take a look at this problem.

@rluble

This comment has been minimized.

Copy link
Collaborator Author

rluble commented Nov 30, 2018

We would like the community to take on making J2CL work in Windows natively. None of the core developers uses Windows machines. We do not consider this a blocker since it works under WSL in Windows 10.

W.r.t the path handling I referred to in the previous comment is mostly constrained to the the reading of the source files. It is very localized and should be pretty straightforward to debug and fix.

@lgemeinhardt

This comment has been minimized.

Copy link

lgemeinhardt commented Dec 7, 2018

I found and fixed the first file/path issue, while running j2cl native with Windows 10 ... added the following fix ".replace('\\', '/')" here "com.google.j2cl.generator.OutputGeneratorStage#generateOutputs:82"

String typeRelativePath = getRelativePath(type).replace('\\', '/');

Not sure if this fix is well placed, but is corrects the issue (looking up an windows path in a map with unix paths)...

Btw. after this, I found a next issue (but only warnings, but tons of it):

WARNING - Failed to resolve sourcemap at bazel-out/x64_windows-fastbuild/bin/external/com_google_j2cl/jre/java/jre.js.zip!/java/io/Closeable$$LambdaAdaptor.js.map: bazel-out\x64_windows-fastbuild\bin\external\com_google_j2cl\jre\java\jre.js.zip!\java\io\Closeable$$LambdaAdaptor.js.map
  Codes: SOURCEMAP_RESOLVE_FAILED

WARNING - Failed to resolve sourcemap at bazel-out/x64_windows-fastbuild/bin/external/com_google_j2cl/jre/java/jre.js.zip!/java/io/Closeable.js.map: bazel-out\x64_windows-fastbuild\bin\external\com_google_j2cl\jre\java\jre.js.zip!\java\io\Closeable.js.map
  Codes: SOURCEMAP_RESOLVE_FAILED

Does somebody from the core team has may a code-pointer to check it?

lgemeinhardt added a commit to lgemeinhardt/j2cl that referenced this issue Jan 22, 2019

Support the workflow under Windows. google#9
I found and fixed the first file/path issue, while running j2cl native with Windows 10 ... added the following fix ".replace('\\', '/')" here "com.google.j2cl.generator.OutputGeneratorStage#generateOutputs:87"

String typeRelativePath = getRelativePath(type).replace('\\', '/');

Not sure if this fix is well placed, but is corrects the issue (looking up an windows path in a map with unix paths)...

lgemeinhardt added a commit to lgemeinhardt/closure-compiler that referenced this issue Jan 23, 2019

SourceFileTest.testSourceFileResolvesZipEntries failes for Windows go…
…ogle#3206

And fixes parts of "Support the workflow under Windows. google#9" (google/j2cl#9) from j2cl
@lgemeinhardt

This comment has been minimized.

Copy link

lgemeinhardt commented Jan 23, 2019

I added a PR to j2cl and one to closure-compiler (for the SOURCEMAP_RESOLVE_FAILED "WARNING") to fix both issues I found.
For sure if the PR for closure-compiler gets included j2cl needs to consume this (not sure how to reference this).

lgemeinhardt added a commit to lgemeinhardt/closure-compiler that referenced this issue Jan 23, 2019

SourceFileTest.testSourceFileResolvesZipEntries failes for Windows go…
…ogle#3206

And fixes parts of "Support the workflow under Windows. google#9"
(google/j2cl#9) from j2cl

lgemeinhardt added a commit to lgemeinhardt/closure-compiler that referenced this issue Jan 23, 2019

SourceFileTest.testSourceFileResolvesZipEntries failes for Windows go…
…ogle#3206

And fixes parts of "Support the workflow under Windows. google#9"
(google/j2cl#9) from j2cl

tjgq added a commit to google/closure-compiler that referenced this issue Jan 25, 2019

Fix zip file entry resolution on Windows.
See also google/j2cl#9.

Fixes #3206.
Closes #3207.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=230635801

dtsengchromium added a commit to dtsengchromium/closure-compiler that referenced this issue Jan 28, 2019

Fix zip file entry resolution on Windows.
See also google/j2cl#9.

Fixes google#3206.
Closes google#3207.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=230635801
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment