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 guava-android Animal Sniffer compatibility testing for Java 8+ APIs #7197

Open
cpovirk opened this issue May 2, 2024 · 0 comments
Open
Labels
P3 package=general type=other Miscellaneous activities not covered by other type= labels

Comments

@cpovirk
Copy link
Member

cpovirk commented May 2, 2024

As of 33.2.0 (and even slightly earlier for package-private and guava-testlib APIs), we have APIs in our Android flavor that require library desugaring. For them, we disable Animal Sniffer. We could do better by having multiple Animal Sniffer runs:

  • the current one, which flags anything that requires a newer version than Lollipop
  • another one that flags anything that requires a newer version than Nougat (the version that we might work with without library desugaring)
  • another one that flags anything that requires more than Lollipop + library desugaring
  • another one that flags anything that requires more than Java 8

Then we'd want to use 2 slightly different sets of annotations to disable Animal Sniffer:

  • one set that disables all those checks (in case we want to conditionally use an API that might not be available)
  • one that disables only the first check

This is not a great description of what I'm going for, but I wanted to get down some rough notes after already touching on this in the linked TODO and in the release notes.

@cpovirk cpovirk added type=other Miscellaneous activities not covered by other type= labels package=general P3 labels May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 package=general type=other Miscellaneous activities not covered by other type= labels
Projects
None yet
Development

No branches or pull requests

1 participant