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

Improve field handling #212

Merged
merged 4 commits into from Sep 3, 2022
Merged

Improve field handling #212

merged 4 commits into from Sep 3, 2022

Conversation

Marcono1234
Copy link
Contributor

Feedback is appreciated! If you want I can also split the commits into separate pull requests.

animal-sniffer-maven-plugin/src/it/fields/pom.xml Outdated Show resolved Hide resolved
Comment on lines +46 to +50
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-annotations</artifactId>
<version>${project.version}</version>
</dependency>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a reason why animal-sniffer-annotations was previously not a dependency? It allows directly referring to the annotation type IgnoreJRERequirement in SignatureChecker.

Though if you want I can also revert this again.

@olamy olamy merged commit febef37 into mojohaus:master Sep 3, 2022
@Marcono1234 Marcono1234 deleted the improve-field-handling branch September 3, 2022 11:40
copybara-service bot pushed a commit to google/guava that referenced this pull request Apr 24, 2023
The main motivation to this CL is to pick up [a fix to Animal Sniffer](mojohaus/animal-sniffer#212): The old version of Animal Sniffer ignores suppression annotations when it looks at fields, and that was causing me problems as I tried to use a field of type `FileAttribute`.

While I was at it, I ran the usual command for updating deps (but not plugins), as documented in cl/503506407.

And then, I inlined a couple properties into the `dependencyManagement` entries that used them. We'd introduced the properties because we used to use multiple artifacts that were released together. However, we don't use multiple artifacts with those properties anymore:
- We stopped using the Animal Sniffer _annotations_ way back in cl/273964192, leaving only the Animal Sniffer plugin.
- We stopped using the Checker Framework's `compat-qual` annotations back in cl/399471446 - cl/399480336, leaving only the main `qual` annotations.
  - But we had temporarily introduced a usage of the `sources` artifact for `qual` in cl/364918297. We removed the usage of it in cl/399190627 but left behind the `dependencyManagement` entry. So this CL removes that, too.

(It's possible that we'd want to move away from using properties for versions in general: While Guava doesn't use Dependabot for `pom.xml` updates (only for GitHub Actions updates, which are easily for our tools to import), we can still update all deps by running a command. So we're not stuck hand-editing multiple locations, and thus all the property provides a layer of indirection. However, until we have a way to automatically update _plugins_, there is some sense in using properties for _plugin_ versions. Or at least there's sense in it for any properties that we still need to use in multiple places. But we might not need to use many (any?) in multiple places anymore, since we finally solved the mystery of why our `pluginManagement` section wasn't being respected back in cl/492304151....)

RELNOTES=n/a
PiperOrigin-RevId: 526467147
copybara-service bot pushed a commit to google/guava that referenced this pull request Apr 24, 2023
The main motivation to this CL is to pick up [a fix to Animal Sniffer](mojohaus/animal-sniffer#212): The old version of Animal Sniffer ignores suppression annotations when it looks at fields, and that was causing me problems as I tried to use a field of type `FileAttribute`.

While I was at it, I ran the usual command for updating deps (but not plugins), as documented in cl/503506407.

And then, I inlined a couple properties into the `dependencyManagement` entries that used them. We'd introduced the properties because we used to use multiple artifacts that were released together. However, we don't use multiple artifacts with those properties anymore:
- We stopped using the Animal Sniffer _annotations_ way back in cl/273964192, leaving only the Animal Sniffer plugin.
- We stopped using the Checker Framework's `compat-qual` annotations back in cl/399471446 - cl/399480336, leaving only the main `qual` annotations.
  - But we had temporarily introduced a usage of the `sources` artifact for `qual` in cl/364918297. We removed the usage of it in cl/399190627 but left behind the `dependencyManagement` entry. So this CL removes that, too.

(It's possible that we'd want to move away from using properties for versions in general: While Guava doesn't use Dependabot for `pom.xml` updates (only for GitHub Actions updates, which are easily for our tools to import), we can still update all deps by running a command. So we're not stuck hand-editing multiple locations, and thus all the property provides a layer of indirection. However, until we have a way to automatically update _plugins_, there is some sense in using properties for _plugin_ versions. Or at least there's sense in it for any properties that we still need to use in multiple places. But we might not need to use many (any?) in multiple places anymore, since we finally solved the mystery of why our `pluginManagement` section wasn't being respected back in cl/492304151....)

RELNOTES=n/a
PiperOrigin-RevId: 526651811
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants