-
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
java_test: Classpath collision between external dependency on auto-value (1.4-rc1) with internally shipped auto-value (1.2) in TestRunner_deploy.jar #2044
Comments
So, verified just now: after downgrading auto-value to 1.3-rc1, it works again on Bazel 0.4.0:
|
Well, this diff in auto-value project would fix this breakage:
However this is the wrong fix. I think I understand now what happens. First thing to notice, is that only one single What is the difference between The major difference is that implicitly
But, the
Note that the
[1] http://paste.openstack.org/show/588066 |
Fixed in: [1]. |
Due to Bazel 0.4.0 incompatibility with auto-value 1.4-rc1, that was recently upgraded to overcome integer overflow bug in hashCode() method reported by Bazel 0.4.0, temporarily disable auto-value test. Consider to enable it again, when this bug was fixed and new Bazel version is released. [1] bazelbuild/bazel#2044 Change-Id: Id3d59908a2721031688645d2a3b039e227e54eca
Assigning to @philwo as he is reviewing the proposed patch anyway. |
Ugh, that sucks...
I assigned to @kush-c to have a look. |
@cgrushko, |
Yep, moving the TestRunner to the end might cause the TestRunner to fail. Disregard the idea :) |
/cc @iirina |
I'm removing the dependency on AutoValue from the test runner. |
Thanks for the quick fix. |
Test dependencies must be respected during classpath generation because some third party dependencies can be only used for the tests, but not for production code path. Otherwise, we would end up producng classpath that missing some dependencies and thus compilation errors in the IDE. This was the case with jimfs, that was added as implicit dependency to the 'tools/eclipse:classpath' rule. Skip Test_runner_deploy.jar library from the Eclipse classpath, as it includes some other third party dependency (most notably outdated auto-value) that could collide with our own version of those dependencies, causing classpath collisions, see: [1] for the glory details: [1]. This is safe thing to do, as we rely on the Eclipse as JUnit test execution environment anyway. * [1] bazelbuild/bazel#2044 Change-Id: I87fff277695a2f64c44a3af65471c0c901860a02
Now, that: [1] is fixed and 0.4.1 is released that includes the fix we can re-enable the auto_value tests again. * [1] bazelbuild/bazel#2044 Change-Id: I19cd699148290ac51d96035dd8c70562ef96ff76
AutoValue has, by design, zero runtime dependency, so couldn't it have simply been marked as |
/CC @dborowitz @hanwen
Not sure, if it's auto-value or Bazel issue. Reporting it here, because it works as expected with Buck, but failing with Bazel:
https://gerrit-ci.gerritforge.com/view/Gerrit/job/Gerrit-master-bazel/203/console
After upgrading Bazel to 0.4.0 and auto-value to
com.google.auto.value:auto-value:1.4-rc1
, our unit test sarted to fail:Interesting enough, on the same code base, Buck build just works:
Bazel vesion:
$ bazel version
Build label: 0.4.0
The text was updated successfully, but these errors were encountered: