-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Recognize Checker Framework *declaration* annotations #1421
Conversation
We are migrating Guava to use these annotations rather than jsr305's @nullable. We can't use the Checker Framework's _@Nullable_ yet because we promise compatibility with Java 7, which doesn't support type annotations. This is related to but distinct from https://youtrack.jetbrains.com/issue/KT-21408, which is about a different jsr305 annotation we use, @ParametersAreNonnullByDefault. I've also updated some docs to mention Kotlin's existing support for the Checker Framework _@NonNull_. NOTE: This commit does not yet run the new tests (though I've found a hacky way to confirm that they will indeed pass). I am unsure how to update files like ForeignAnnotationsTestGenerated.java that say they are generated with org.jetbrains.kotlin.generators.tests.TestsPackageorg.jetbrains.kotlin.generators.tests.TestsPackage (and so testAllFilesPresentInTests is failing for them). Please advise me how to update those files. Thanks.
To update |
Thanks! I've updated the generated tests. |
We have a version of Guava coming out that uses the Checker Framework declaration annotations, so we're eager to see this go in. Let me know if there's anything else I can do to help things along. |
Could you please report a separate issue describing your use case, so that we could track it properly, it'd end up in the changelog in the correct place, etc. Thanks! |
Thanks. I've filed KT-21982. |
And thank you! |
We are migrating Guava to use these annotations rather than jsr305's
@Nullable
.We can't use the Checker Framework's
@Nullable
yet because we promise compatibility with Java 7, which doesn't support type annotations.This is related to but distinct from https://youtrack.jetbrains.com/issue/KT-21408, which is about a different jsr305 annotation we use,
@ParametersAreNonnullByDefault
.I've also updated some docs to mention Kotlin's existing support for the Checker Framework
@NonNull
.NOTE: This commit does not yet run the new tests (though I've found a hacky way to confirm that they will indeed pass). I am unsure how to update files like
ForeignAnnotationsTestGenerated.java
that say they are generated withorg.jetbrains.kotlin.generators.tests.TestsPackageorg.jetbrains.kotlin.generators.tests.TestsPackage
(and sotestAllFilesPresentInTests
is failing for them). Please advise me how to update those files. Thanks.