Skip to content
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

Upgrade error_prone to 2.18.0 (from 2.16) #2472

Merged
merged 3 commits into from
Mar 6, 2023

Conversation

carterkozak
Copy link
Contributor

==COMMIT_MSG==
Upgrade error_prone to 2.18.0 (from 2.16)
==COMMIT_MSG==

Possible downsides?

New checks added in https://github.com/google/error-prone/releases/tag/v2.17.0 and https://github.com/google/error-prone/releases/tag/v2.18.0 may prevent upgrades from auto-merging.

@changelog-app
Copy link

changelog-app bot commented Jan 17, 2023

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Upgrade error_prone to 2.18.0 (from 2.16)

Check the box to generate changelog(s)

  • Generate changelog entry

@a-k-g
Copy link
Contributor

a-k-g commented Feb 20, 2023

Stumbled upon this as we we're hitting google/error-prone#2321 on an internal repo. The fix is in 2.17.0 but not sure if that is any easier to merge.

@carterkozak carterkozak force-pushed the ckozak/error_prone_2_18_0 branch from 55c7ab1 to 8b22954 Compare March 6, 2023 15:38
Comment on lines +58 to 59
@Inject
public LogsafeArgName(ErrorProneFlags flags) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caught by InjectOnBugCheckers in 2.18.0.

@@ -52,6 +52,9 @@ allprojects {
check("PreferSafeLogger", CheckSeverity.OFF)
check("PreferSafeLoggingPreconditions", CheckSeverity.OFF)
check("PreconditionsConstantMessage", CheckSeverity.OFF)
// temporarily opt out of error-prone in order to upgrade checkerframework.
// This should be removed as soon as baseline is next upgraded within this repo.
enabled = false
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've compiled this using a snapshot of itself, things seem good, the problem is upgrading dependencies makes our existing baseline classes (applied to this project) incompatible with the upgraded checkerframework.

Copy link
Contributor Author

@carterkozak carterkozak Mar 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carterkozak carterkozak requested a review from schlosna March 6, 2023 16:20
"Varifier");
"Varifier",
// Yoda style should not block baseline upgrades.
"YodaCondition");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few new 🌶️ checkers, I would bet on AvoidObjectArrays, Finalize, YodaCondition likely need some manual intervention/suppression upon rollout (though in general I think we want those checks enabled)

2.17:

AvoidObjectArrays
Finalize
IgnoredPureGetter
ImpossibleNullComparison
MathAbsoluteNegative
NewFileSystem
StatementSwitchToExpressionSwitch
UnqualifiedYield

2.18:

InjectOnBugCheckers
LabelledBreakTarget
UnusedLabel
YodaCondition

@bulldozer-bot bulldozer-bot bot merged commit 7f1c033 into develop Mar 6, 2023
@bulldozer-bot bulldozer-bot bot deleted the ckozak/error_prone_2_18_0 branch March 6, 2023 16:35
@svc-autorelease
Copy link
Collaborator

Released 4.189.0

bulldozer-bot bot pushed a commit to palantir/witchcraft-api that referenced this pull request Mar 12, 2023
###### _excavator_ is a bot for automating changes across repositories.

Changes produced by the roomba/latest-baseline-oss check.

# Release Notes
## 4.189.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Improvement | Upgrade error_prone to 2.18.0 (from 2.16) | palantir/gradle-baseline#2472 |


## 4.190.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Feature | Added `DangerousCollapseKeysUsage` error prone check to disallow usage of `collapseKeys()` API of `EntryStream`. | palantir/gradle-baseline#2291 |
| Feature | Prefer common versions of annotations over other copies | palantir/gradle-baseline#2505 |



To enable or disable this check, please contact the maintainers of Excavator.
This was referenced Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants