You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building the project, an error occured during the execution of java/elemental2/core:es3_patched:
bazel build //src/main/java/j2clhelloworld/javafrontend:javafrontendlib --incompatible_depset_union=false
WARNING: /home/johan/.cache/bazel/_bazel_johan/378033271060b971d17254500543d94e/external/bazel_tools/tools/jdk/BUILD:121:1: in alias rule @bazel_tools//tools/jdk:jar: target '@bazel_tools//tools/jdk:jar' depends on deprecated target '@local_jdk//:jar': Don't depend on targets in the JDK workspace; use @bazel_tools//tools/jdk:current_java_runtime instead (see https://github.com/bazelbuild/bazel/issues/5594)
WARNING: /home/johan/.cache/bazel/_bazel_johan/378033271060b971d17254500543d94e/external/com_google_jsinterop_generator/third_party/BUILD:62:1: in alias rule @com_google_jsinterop_generator//third_party:jar: target '@com_google_jsinterop_generator//third_party:jar' depends on deprecated target '@local_jdk//:jar': Don't depend on targets in the JDK workspace; use @bazel_tools//tools/jdk:current_java_runtime instead (see https://github.com/bazelbuild/bazel/issues/5594)
WARNING: /home/johan/.cache/bazel/_bazel_johan/378033271060b971d17254500543d94e/external/com_google_elemental2/java/elemental2/core/BUILD:38:1: in _jsinterop_generator rule @com_google_elemental2//java/elemental2/core:core__internal_src_generated: target '@com_google_elemental2//java/elemental2/core:core__internal_src_generated' depends on deprecated target '@local_jdk//:jar': Don't depend on targets in the JDK workspace; use @bazel_tools//tools/jdk:current_java_runtime instead (see https://github.com/bazelbuild/bazel/issues/5594)
INFO: Analyzed target //src/main/java/j2clhelloworld/javafrontend:javafrontendlib (107 packages loaded, 1860 targets configured).
INFO: Found 1 target...
INFO: From Executing genrule @com_google_elemental2//java/elemental2/core:es3_patched:
patching file bazel-out/k8-fastbuild/bin/external/com_google_elemental2/java/elemental2/core/es3_patched.js (read from external/com_google_closure_compiler/externs/es3.js)
Hunk #1 failed at 2052
Hunk #2 failed at 2063
Hunk #3 failed at 2071
I was able to fix the error by updating GNU patch to 2.7.6 (I downloaded it and built it from ftp://ftp.gnu.org/gnu/patch because it's not in Linux Mint 18.2 repository).
The error was caused by patch 2.7.5 apparently not supporting patching files in a different folder. This failed:
patch src/main/java/j2clhelloworld/pathellxternalfiletest/es3.js -i src/main/java/j2clhelloworld/pathexternalfiletest/es3.js.diff -o bazel-out/k8-fastbuild/bin/src/main/java/j2clhelloworld/pathexternalfiletest/es3_patched.js
patching file bazel-out/k8-fastbuild/bin/src/main/java/j2clhelloworld/pathexternalfiletest/es3_patched.js (read from src/main/java/j2clhelloworld/pathellxternalfiletest/es3.js)
Hunk #1 FAILED at 2053.
Hunk #2 FAILED at 2064.
Hunk #3 FAILED at 2072.
3 out of 3 hunks FAILED -- saving rejects to file bazel-out/k8-fastbuild/bin/src/main/java/j2clhelloworld/pathexternalfiletest/es3_patched.js.rej
When removing the -o option, it says the file name is invalid:
This kind of error can happen when there is a synchronization issue between extern files (that are not provided by this repository) and the diff file.
That being said, after reading your logs when you tried to patch manually the files, it seems there is an error in the path to the js file:
src/main/java/j2clhelloworld/pathellxternalfiletest/es3.js instead of src/main/java/j2clhelloworld/pathexternalfiletest/es3.js
Could you confirm is not an error?
Hi
I tried using elemental2 with j2cl. My BUILD file contains this config :
When building the project, an error occured during the execution of java/elemental2/core:es3_patched:
I was able to fix the error by updating GNU patch to 2.7.6 (I downloaded it and built it from ftp://ftp.gnu.org/gnu/patch because it's not in Linux Mint 18.2 repository).
The error was caused by patch 2.7.5 apparently not supporting patching files in a different folder. This failed:
When removing the
-o
option, it says the file name is invalid:but this worked :
After upgrading to 2.7.6, they both work, and I'm able to build my j2cs project.
The text was updated successfully, but these errors were encountered: