-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
resolve temporary constraint exclude of errorprone("com.google.guava:guava")
#5039
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -11,14 +11,6 @@ plugins { | |||||
| dependencies { | ||||||
| errorprone(dependencyFromLibs("errorProne-core")) | ||||||
| errorprone(dependencyFromLibs("nullaway")) | ||||||
| constraints { | ||||||
| errorprone("com.google.guava:guava") { | ||||||
| version { | ||||||
| require("33.4.8-jre") | ||||||
| } | ||||||
| because("Older versions use deprecated methods in sun.misc.Unsafe") | ||||||
| } | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| nullaway { | ||||||
|
|
@@ -27,8 +19,9 @@ nullaway { | |||||
|
|
||||||
| tasks.withType<JavaCompile>().configureEach { | ||||||
| options.errorprone { | ||||||
| val shouldDisableErrorProne = java.toolchain.implementation.orNull == JvmImplementation.J9 | ||||||
| if (name == "compileJava" && !shouldDisableErrorProne) { | ||||||
| disableWarningsInGeneratedCode = true | ||||||
| disableAllChecks = !(name == "compileJava" && java.toolchain.implementation.orNull != JvmImplementation.J9) | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
these braces over the whole term cost me lots of time. SOC is always best. This way we can reduce the field overhead and be straight forward, avoiding the extra context of shouldDisableErrorProne and disableAllChecks is kind of the same story. |
||||||
| if (!disableAllChecks.get()) { | ||||||
| disable( | ||||||
|
|
||||||
| // This check is opinionated wrt. which method names it considers unsuitable for import which includes | ||||||
|
|
@@ -52,11 +45,9 @@ tasks.withType<JavaCompile>().configureEach { | |||||
| "MissingSummary", | ||||||
| ) | ||||||
| error("PackageLocation") | ||||||
| } else { | ||||||
| disableAllChecks = true | ||||||
| } | ||||||
| nullaway { | ||||||
| if (shouldDisableErrorProne) { | ||||||
| if (disableAllChecks.get()) { | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would disable NullAway for
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We want
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks for clarification. Bad combo leads to failing build anyways, so this should be kind of the same without the coupling right? |
||||||
| disable() | ||||||
| } else { | ||||||
| enable() | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember recently seeing this
sun.misc.Unsafeto be an issue seen in spot, but not here, despite using the same version.Assuming this is not needed anymore, right?
Its passing
assemble, which is failing when removing some of thedisableitems.error-prone.picnic.techfeaturingRedundantStringConversiondiffplug/spotless#2664Its just an warning not an error so the cases are different.
vs
maybe then keeping it makes sense again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The constraint is not an "exclude" but an update of a transitive dependency that's still in action:
https://ge.junit.org/s/miswateogm3po/dependencies?dependencies=guava&expandAll&focusedDependencyView=versions
Without it, noisy warnings are printed during the build:
https://ge.junit.org/s/mvdx45wqr7tom/console-log#L77-L80
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks yes updated the doc to prevent any furhter...