-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Fix and disallow Java classpath collisions in Bazel #23592
base: master
Are you sure you want to change the base?
Conversation
I had to disable oneversion checks for tests as there are far too many violations. |
@hvadehra is definitely a better reviewer for this one ;) |
There is one remaining failure in Do you see a way to get rid of this duplication? |
Hmm, if fwiw, this ugly hack gets JavaBuilder to build:
But after this,
|
cc @cushon |
I'll look in the remaining violations. I think we can fix them, but it'll take time to get the fixes released. Note that the internal version of this has a finer grained allowlist mechanism to deal with this kind of thing, to allow suppressing specific violations to make it easier to roll out in code bases with existing violations: #1071 (comment). We should probably spin off a FR for that if it doesn't happen as part of #1071, something like that may be useful for other Bazel users trying to roll this out. The turbine violation is because it deliberately forks some code from Guava, and then declares a
I'm not sure #23592 (comment) is the right fix, does the JavaBuilder actually work at runtime with that change? Is it just excluding transitive deps of the Error Prone jars? |
I didn't try that nor run any tests. To be clear, I was not suggesting we proceed that way, just that there are potentially more violations to worry about than those caught by CI :)
That was the idea, yes. |
I have a fix in progress for turbine, and filed typetools/checker-framework#6795 for the dataflow issue. I also wrote up the FR for the allowlist as #23598, I think that's probably a good next step instead of trying to chase down all of the one version issues in Bazel and waiting for them to be fixed upstream. |
to avoid one version conflicts, as reported in bazelbuild/bazel#23592 PiperOrigin-RevId: 673396090
to avoid one version conflicts, as reported in bazelbuild/bazel#23592 PiperOrigin-RevId: 673396090
to avoid one version conflicts, as reported in bazelbuild/bazel#23592 PiperOrigin-RevId: 673420893
This relies on the recently added oneversion support in rules_java.
This relies on the recently added oneversion support in rules_java.