-
Notifications
You must be signed in to change notification settings - Fork 3
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
Isolate bazel_worker_java dependencies #7
Comments
We could use a different maven namespace for this module, but wouldn't there be risks of conflict classes? If your target A depends on bazel-worker-api, which depends on guava, and your target also directly depends on a different version of guava from another maven namespace. |
Yes, care has to be taken when using multiple namespaces (https://github.com/bazel-contrib/rules_jvm_external?tab=readme-ov-file#multiple-maven_install-declarations-for-isolated-artifact-version-trees) that the dep classes from the different namespaces don't make it into the same top level target, i.e. enforcing the one-version rule at the target level. Is there warning too verbose? We can consider improving it if that's the main concern. |
The messages are definitely verbose. Any time you run a Bazel command where it has to bring up the server for the first time, the console gets hit with a flood of warnings from |
This can be fixed by updating to v29.1 of |
The problem also exists in this repo: bazel-worker-api/java/MODULE.bazel Line 39 in 3dfa382
Should we also rename it? |
I would suggest doing so if the repos are independent of each other. |
Say if I have a target:
If we rename the maven install for |
There are two options:
I don't think renaming is the right solution, because bazel-worker-api/java/src/main/java/com/google/devtools/build/lib/worker/BUILD.bazel Line 6 in 3dfa382
:work_request_handlers 's deps should also be contributed into default user @maven namespace, so that there's only one resolved version per jar in the runtime classpath of those worker tools.
I'll work on a separate patch to reduce the noise. |
@jin Thanks for the clarification! |
bazel-contrib/rules_jvm_external#1295 will fix the noisy logs. |
We see lots of warnings in our console builds because of these rules relying on the default rules_jvm_external
maven
namespaces.The solution here would be to move these maven dependencies into their own namespace.
And as a result of using the default shared namespace:
The text was updated successfully, but these errors were encountered: