Skip to content
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

Sync of J2CL example fails #2240

Closed
FliegendeWurst opened this issue Dec 4, 2020 · 2 comments
Closed

Sync of J2CL example fails #2240

FliegendeWurst opened this issue Dec 4, 2020 · 2 comments
Labels
product: IntelliJ IntelliJ plugin type: plugin support requests Requests for supporting new languages or being compatible with other IDE tools

Comments

@FliegendeWurst
Copy link

FliegendeWurst commented Dec 4, 2020

The error below occurs when I try to partially sync a Java file. I tried to import this example project: https://github.com/google/j2cl/tree/master/samples/helloworld

bazel console:

Syncing project: Partial Sync (partial)...
Updating VCS...
Running Bazel info...
Command: bazel info --tool_tag=ijwb:IDEA:ultimate --curses=no --color=yes --progress_in_terminal_title=no --

Computing VCS working set...
Querying targets building source files...
Command: bazel query --tool_tag=ijwb:IDEA:ultimate --output=label_kind --keep_going same_pkg_direct_rdeps(//src/main/java/com/google/j2cl/samples/helloworldlib:HelloWorld.java) --

Sync targets from Partial Sync (targets derived from query):
  //src/main/java/com/google/j2cl/samples/helloworldlib:helloworldlib-j2wasm
  //src/main/java/com/google/j2cl/samples/helloworldlib:helloworldlib

Building Bazel targets...
Command: bazel build --tool_tag=ijwb:IDEA:ultimate --keep_going --build_event_binary_file=/tmp/intellij-bep-ec727f0a-54e4-430e-a4bc-d0dc8ed9cb34 --nobuild_event_binary_file_path_conversion --curses=no --color=yes --progress_in_terminal_title=no --noexperimental_run_validations --aspects=@intellij_aspect//:intellij_info_bundled.bzl%intellij_info_aspect --override_repository=intellij_aspect=/home/user/.local/share/JetBrains/IntelliJIdea2020.1/ijwb/aspect --output_groups=intellij-info-generic,intellij-info-java,intellij-info-js,intellij-resolve-java,intellij-resolve-js -- //src/main/java/com/google/j2cl/samples/helloworldlib:helloworldlib-j2wasm //src/main/java/com/google/j2cl/samples/helloworldlib:helloworldlib

Loading: 
Loading: 0 packages loaded
Analyzing: 2 targets (0 packages loaded, 0 targets configured)
ERROR: /home/user/project/path/src/main/java/com/google/j2cl/samples/helloworldlib/BUILD:15:13: no such target '@com_google_j2cl//:jsinterop-annotations-j2wasm': target 'jsinterop-annotations-j2wasm' not declared in package '' (did you mean 'jsinterop-annotations-j2cl'?) defined by /home/user/.cache/bazel/_bazel_user/3825a7323d00cbb9a28788baaa5f5cde/external/com_google_j2cl/BUILD and referenced by '//src/main/java/com/google/j2cl/samples/helloworldlib:helloworldlib-j2wasm'
WARNING: errors encountered while analyzing target '//src/main/java/com/google/j2cl/samples/helloworldlib:helloworldlib-j2wasm': it will not be built
INFO: Analysis succeeded for only 1 of 2 top-level targets
INFO: Analyzed 2 targets (1 packages loaded, 218 targets configured).
INFO: Found 1 target...
[0 / 1] [Prepa] BazelWorkspaceStatusAction stable-status.txt
Aspect @intellij_aspect//:intellij_info_bundled.bzl%intellij_info_aspect of //src/main/java/com/google/j2cl/samples/helloworldlib:helloworldlib up-to-date:
  bazel-bin/external/com_google_jsinterop_annotations-j2cl/java/jsinterop/annotations/annotations-j2cl--2120158086.intellij-info.txt
  bazel-bin/external/io_bazel_rules_closure/closure/library/debug/error-96784904.intellij-info.txt
  bazel-bin/external/io_bazel_rules_closure/closure/library/dom/nodetype-1124035644.intellij-info.txt
  bazel-bin/external/io_bazel_rules_closure/closure/library/asserts/asserts--704776723.intellij-info.txt
  bazel-bin/external/io_bazel_rules_closure/closure/library/reflect/reflect-1085265597.intellij-info.txt
  bazel-bin/external/io_bazel_rules_closure/closure/library/math/long-3327612.intellij-info.txt
  bazel-bin/external/com_google_j2cl/third_party/gwt-javaemul-internal-annotations-j2cl-140462599.intellij-info.txt
  bazel-bin/external/com_google_j2cl/jre/java/jre-105501.intellij-info.txt
  bazel-bin/external/com_google_j2cl/jre-105501.intellij-info.txt
  bazel-bin/src/main/java/com/google/j2cl/samples/helloworldlib/helloworldlib-429730949.intellij-info.txt
  bazel-bin/external/com_google_j2cl/jre/java/j2cl_java_toolchain--1419832102.intellij-info.txt
ERROR: command succeeded, but there were loading phase errors
INFO: Elapsed time: 0.527s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
INFO: Build Event Protocol files produced successfully.
FAILED: Build did NOT complete successfully
build invocation result: build_error
Sync was successful, but there were Bazel build errors. The project may not be fully updated or resolve until fixed. If the errors are from your working set, please uncheck 'Bazel > Sync > Expand Sync to Working Set' and try again.
Parsing build outputs...
Total rules: 14, new/changed: 0, removed: 0
Reading IDE info result...
Reading IDE info result...
Updating target map
Loaded 0 aspect files, total size 0kB
Target map size: 1
Prefetching output artifacts...
Reading jdeps files...
Loaded 0 jdeps files, total size 0kB
Reading package manifests...
Java content entry count: 2
Filtering empty jars...
Fetching JARs to track empty status..
Filtered 0 JARs, in 1ms
Updating Jar Cache...
Prefetching files...
Refreshing files
Computing directory structure...
Initializing project SDKs...
Committing project structure...
Workspace has 0 libraries
Workspace has 2 modules
Updating in-memory state...
Sync finished

Timing summary:
BlazeInvocation: 2.8s, Prefetching: 1ms, Other: 48ms
Sync failed

Version information

IdeaUltimate: 2020.1.4
Platform: Linux 5.8.15-1-default
Bazel plugin: 2020.11.17.0.2
Bazel: 3.7.1

@AugustNagro
Copy link

AugustNagro commented Dec 6, 2020

I created an example (copying the relevant files into a new project), and can reproduce your error.

Also, Intellij is unable to recognize the @JSType and other J2CL dependencies.

@mai93 mai93 added type: feature request product: IntelliJ IntelliJ plugin type: plugin support requests Requests for supporting new languages or being compatible with other IDE tools and removed type: feature request labels Feb 8, 2021
@sgowroji
Copy link
Member

Hi there! We're doing a clean up of old issues and will be closing this one. Please reopen if you’d like to discuss anything further. We’ll respond as soon as we have the bandwidth/resources to do so.

@sgowroji sgowroji closed this as not planned Won't fix, can't repro, duplicate, stale Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: IntelliJ IntelliJ plugin type: plugin support requests Requests for supporting new languages or being compatible with other IDE tools
Projects
None yet
Development

No branches or pull requests

4 participants