-
Notifications
You must be signed in to change notification settings - Fork 60
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
Failed to find javaparser in runfiles #211
Comments
Can you share your version of Bazel and ideally a repo with a repro? |
I've tried 6.3.0, 6.1.0 and 5.4.1. I've been able to replicate here: |
Thanks for the repro repo. I get the same error as you. This looks like an issue with our use of FindBinary here:
Hardcoding I will try to have a look at what is going on this week. |
That worked a treat. Thanks @stevebarrau EDIT: Did you want me to close this Issue or leave it open for the fix? |
@KrisJohnstone can you give #216 a try and see if this resolve this issue? |
I get the following weirdly: /private/var/tmp/_bazel_krisjohnstone/3337dddeaeeddd03860ac735ca6cd027/execroot/main/bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/contrib_rules_jvm/java/src/com/github/bazel_contrib/contrib_rules_jvm/javaparser/generators/Main: Cannot locate runfiles directory. (Set $JAVA_RUNFILES to inhibit searching.) |
Same here - after trying #216 |
Same here too with #216. I will add: I'm using Bzlmod.
|
I'll say I'm using bzlmod as well and am hitting the same issue. Mine is for using the For reproducibility: bazelrc:
MODULE.bazel module(name = "test")
bazel_dep(name = "gazelle", version = "0.34.0")
bazel_dep(name = "contrib_rules_jvm", version = "0.18.0") BUILD.bazel: load("@gazelle//:def.bzl", "DEFAULT_LANGUAGES", "gazelle", "gazelle_binary")
gazelle(
name = "gazelle",
gazelle = ":gazelle_bin",
)
gazelle_binary(
name = "gazelle_bin",
languages = DEFAULT_LANGUAGES + [
"@contrib_rules_jvm//java/gazelle",
],
) Running Gazelle: bazel run //:gazelle ✔
INFO: Analyzed target //:gazelle (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //:gazelle up-to-date:
bazel-bin/gazelle-runner.bash
bazel-bin/gazelle
INFO: Elapsed time: 0.039s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/gazelle
2:09PM FTL external/contrib_rules_jvm~0.18.0/java/gazelle/configure.go:133 > could not start javaparser error="failed to start / connect to javaparser server: failed to find javaparser in runfiles"
|
I've opened #224 to fix the issue with locating However, in my specific case, I'm hitting a different error now: Can some of you try on your side my branch version and report if you're hitting the same issue? You can use the following override if you're on Bzlmod git_override(
module_name = "contrib_rules_jvm",
remote = "https://github.com/ar3s3ru/rules_jvm",
commit = "b01bab003632dc0624a4e8ff1d4354881ee95a7c",
) Some details on my local project:
Error output:
|
Seems like the error I was mentioning above was happening since (More context here: https://bazelbuild.slack.com/archives/C01HMGN77Q8/p1701887957242259) My latest commit apparently fixes that, at least on my private repro project: b01bab0 |
This should resolve #211 for good. The java dependencies changes are caused by a run of ./tools/update-dependencies.sh. Co-authored-by: Danilo Cianfrone <danilocianfr@gmail.com>
Great to see this is fixed! 🎉 Is there already a plan for when a new release including this will get cut? |
I just released v0.20.0 including this fix. |
Amazing, thanks for the quick turnaround on this! |
@illicitonion I don't see that version in BCR 👀 |
It looks like we don't have automatic BCR mirroring enabled - you can following along at bazelbuild/bazel-central-registry#1268 to see how our progress at getting automatic mirroring working goes. |
Attempting to convert a project and am getting a javaparser error.
Expected Outcome:
(At the very least a migrated listed of maven dependencies)
Actual Outcome:
11:03PM FTL external/contrib_rules_jvm/java/gazelle/configure.go:133 > could not start javaparser error="failed to start / connect to javaparser server: failed to find javaparser in runfiles"
Files/Stepts to Reproduce:
Workspace:
BUILD file:
Output of bazel build:
Full Error:
The text was updated successfully, but these errors were encountered: