salesforce / bazel-vscode-java

Bazel Java development extension for VS Code
BSD 3-Clause "New" or "Revised" License
41 stars 8 forks source link

Trivial Bazel 6.4.0 example WITH `rules_jvm_external` fails to open (with a another error) #75

Closed vorburger closed 9 months ago

vorburger commented 9 months ago

When I open code rules_jvm_external/ in https://github.com/vorburger/LearningBazel it fails like this:

Command failed: bazel --output_base=/tmp/33f1df7beca4082e021dfd08c653c0c8 query ...:* --output=package
Loading: 0 packages loaded
ERROR: error loading package under directory '': error loading package 'bazel-rules_jvm_external/external/rules_jvm_external~5.3/tests/unit/manifest_stamp': Unable to find package for @[unknown repo 'bazel_skylib' requested from @]//rules:diff_test.bzl: The repository '@[unknown repo 'bazel_skylib' requested from @]' could not be resolved: No repository visible as '@bazel_skylib' from main repository.
Loading: 6 packages loaded
    currently loading: bazel-rules_jvm_external/external/rules_jvm_external~5.3~maven~maven ... (6 packages)

This probably should be made to work before #73 is further analysed.

vorburger commented 9 months ago

@guw

vorburger commented 9 months ago

As per #74, the error message above is a "red herring" - that's not from this extension! (I've added it to https://github.com/bazelbuild/vscode-bazel/issues/328 to track this there; ignore it, here.)

After Java: Clean Java Language Server Workspace (from the new Troubleshooting Guide), it actually seems to work perfectly fine; there are no Problems, the Main.java editor has no red, and I can "navigate into" JDK classes and e.g. Guava's MoreObjects.toStringHelper which is used in that example, and syntax completion works.

Case closed. I'll further (re)pursue #73 instead next (another day).