google / jsinterop-generator

Generates Java annotated with JsInterop from JavaScript extern sources
Apache License 2.0
75 stars 24 forks source link

provide link to download the generator #49

Open yhilem opened 2 years ago

yhilem commented 2 years ago

Hi, Can't build the generator on my Windows10 platform. Can you provide a link to download the generator ? Thanks

niloc132 commented 2 years ago

Unfortunately, the generator is difficult to use at all if you aren't running bazel, as if you reference any core or dom JS types, you will need the generated output from building the google/elemental2 project - and at least at this time, those are not baked into the jar for consumption or otherwise published outside of bazel. You might be better off using WSL2 to run bazel on your system, or otherwise run a VM.

yhilem commented 2 years ago

Ok, thanks I'll try a build with docker.

On Windows10 with Bazel, the error is that I don't have the VC++ compiler

C:\OpenSource\GWT\google_jsinterop-generator_\jsinterop-generator-master>
C:\OpenSource\GWT\google_jsinterop-generator_\jsinterop-generator-master>C:\Tools\bazelisk\bazelisk-windows-amd64.exe build //java/jsinterop/generator/closure:ClosureJsinteropGenerator_deploy.jar
2022/02/01 08:43:46 Downloading https://releases.bazel.build/4.2.2/release/bazel-4.2.2-windows-x86_64.exe...
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: SHA256 (https://github.com/google/j2cl/archive/master.zip) = 86b1d6d4213d93ee08a3c661882fc7eb4fb92c02356168f961a470e6c635fdab
DEBUG: Rule 'com_google_j2cl' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "86b1d6d4213d93ee08a3c661882fc7eb4fb92c02356168f961a470e6c635fdab"
DEBUG: Repository com_google_j2cl instantiated at:
  C:/opensource/gwt/google_jsinterop-generator_/jsinterop-generator-master/WORKSPACE:8:13: in <toplevel>
Repository rule http_archive defined at:
  C:/users/coliposte/_bazel_coliposte/m5ht37ov/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
WARNING: Download from https://mirror.bazel.build/repo1.maven.org/maven2/com/google/guava/guava/30.1.1-jre/guava-30.1.1-jre.jar failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
WARNING: Download from https://mirror.bazel.build/repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
INFO: Analyzed target //java/jsinterop/generator/closure:ClosureJsinteropGenerator_deploy.jar (57 packages loaded, 1373 targets configured).
INFO: Found 1 target...
ERROR: C:/users/coliposte/_bazel_coliposte/m5ht37ov/external/com_google_protobuf/BUILD:387:11: Compiling src/google/protobuf/compiler/cpp/cpp_map_field.cc failed: (Exit 1): vc_installation_error_x64.bat failed: error executing command external/local_config_cc/vc_installation_error_x64.bat /nologo /DCOMPILER_MSVC /DNOMINMAX /D_WIN32_WINNT=0x0601 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS /bigobj /Zm500 /EHsc /wd4351 /wd4291 ... (remaining 36 argument(s) skipped)

The target you are compiling requires Visual C++ build tools.
Bazel couldn't find a valid Visual C++ build tools installation on your machine.
Please check your installation following https://docs.bazel.build/versions/master/windows.html#using

Target //java/jsinterop/generator/closure:ClosureJsinteropGenerator_deploy.jar failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 63.545s, Critical Path: 1.66s
INFO: 31 processes: 16 internal, 15 local.
FAILED: Build did NOT complete successfully

C:\OpenSource\GWT\google_jsinterop-generator_\jsinterop-generator-master>