Skip to content

Support the workflow under Windows.  #9

Open

Description

@rluble

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.

Activity

  1. markposterone commented on Nov 15, 2018

    @markposterone

    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 ?

  2. tbroyer commented on Nov 15, 2018

    @tbroyer
    Contributor

    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".

  3. vojkog commented on Nov 15, 2018

    @vojkog

    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?

  4. markposterone commented on Nov 15, 2018

    @markposterone

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

  5. vojkog commented on Nov 15, 2018

    @vojkog
  6. markposterone commented on Nov 30, 2018

    @markposterone

    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.

  7. rluble commented on Nov 30, 2018

    @rluble
    CollaboratorAuthor

    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.

  8. lgemeinhardt commented on Dec 7, 2018

    @lgemeinhardt
    Contributor

    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?

  9. lgemeinhardt commented on Jan 23, 2019

    @lgemeinhardt
    Contributor

    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).

  10. added a commit that references this issue on Jan 25, 2019
  11. lgemeinhardt commented on Mar 1, 2019

    @lgemeinhardt
    Contributor

    Could we update the closure-compiler to version to v20190215 to solve
    "SourceFileTest.testSourceFileResolvesZipEntries failes for Windows #3206" issue?!

  12. added a commit that references this issue on Mar 1, 2019
  13. markposterone commented on Mar 14, 2019

    @markposterone

    What's the status of this ?

  14. gkdn commented on Mar 14, 2019

    @gkdn
    Member

    I am working on updating Closure rules workspace to work with the newer Closure release; should be completed next week.

  15. gkdn commented on Apr 9, 2019

    @gkdn
    Member

    Closure compiler version is updated to latest release in bazelbuild/rules_closure#347.

  16. v7r commented on Jan 13, 2021

    @v7r

    As of 2021Jan13, I attempted to setup the j2cl in Windows 10. Following the "Getting Started" guide and installing bazel for Windows 10, the setup was successful. But, I saw an error related to "zipper.exe Argument list too long".

    d:\j2cl\samples\helloworld> bazel build src/main/java/com/google/j2cl/samples/helloworld:helloworld
    INFO: Analyzed target //src/main/java/com/google/j2cl/samples/helloworld:helloworld (0 packages loaded, 0 targets configured).
    INFO: Found 1 target...
    ERROR: C:/users/myuser/_bazel_myuser/myku6orf/external/com_google_j2cl/jre/java/BUILD:45:16: error executing shell command: 'C:/msys64/usr/bin/bash.exe -c set -eu
    shopt -s extglob
    zip_args="c bazel-out/x64_windows-fastbuild/bin/external/com_google_j2cl/jre/java/jre_java_files.srcjar"
    for src in "$@"
    do
    relative_name=${...' failed (Exit 126): bash.exe failed: error executing command C:/msys64/usr/bin/bash.exe -c ... (remaining 304 argument(s) skipped)
    : line 11: external/bazel_tools/tools/zip/zipper/zipper.exe: Argument list too long
    Target //src/main/java/com/google/j2cl/samples/helloworld:helloworld failed to build
    Use --verbose_failures to see the command lines of failed build steps.
    INFO: Elapsed time: 0.781s, Critical Path: 0.27s
    INFO: 3 processes: 3 internal.
    FAILED: Build did NOT complete successfully

    Error message seems to be related to bazel and may not related to j2cl. Someone please shed light on this.

    Does anyone faced this issue ?

  17. tbroyer commented on Jan 13, 2021

    @tbroyer
    Contributor

    Yes, see #121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions