Annotate more format methods in trino-spi#15052
Closed
ksobolew wants to merge 1 commit intotrinodb:masterfrom
Closed
Annotate more format methods in trino-spi#15052ksobolew wants to merge 1 commit intotrinodb:masterfrom
ksobolew wants to merge 1 commit intotrinodb:masterfrom
Conversation
The `@FormatMethod` annotation allows more cases to be checked by the `FormatStringAnnotation` checker. There are no mis-uses of these methods to fix. All annotated elements are non-public, so the annotation's effects do not leave the module. Except that this requires adding a dependency on `error_prone_annotations`, and this in turn requires adding it as a `provided` dependency on all modules which depend on `trino-spi` and not use this dependency themselves.
kokosing
reviewed
Nov 16, 2022
| @@ -35,6 +35,11 @@ | |||
| <optional>true</optional> | |||
Member
There was a problem hiding this comment.
All annotated elements are non-public,
After a second look, I think we should abandon this PR. It is not going to any plugin implementation and as you have already noticed (with There are no mis-uses) we are solving a problem that do not manifest today. So I think the price of adding new dependency to SPI is too high comparing to benefits.
Contributor
Author
There was a problem hiding this comment.
It's a tough one, yes. We can skip it.
Contributor
Author
|
Closing because changing SPI's dependencies is not trivial. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
@FormatMethodannotation allows more cases to be checked by theFormatStringAnnotationchecker. There are no mis-uses of these methods to fix. All annotated elements are non-public, so the annotation's effects do not leave the module. Except that this requires adding a dependency onerror_prone_annotations, and this in turn requires adding it as aprovideddependency on all modules which depend ontrino-spiand not use this dependency themselves.Non-technical explanation
Better code quality.
Release notes
(x) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text: