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

Recognize Checker Framework *declaration* annotations #1421

Closed
wants to merge 2 commits into from

Conversation

cpovirk
Copy link
Contributor

@cpovirk cpovirk commented Dec 5, 2017

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.

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.
@udalov
Copy link
Member

udalov commented Dec 6, 2017

To update *Generated tests, you can run ./gradlew generateTests or the run configuration "Generate All Tests" in IntelliJ

@cpovirk
Copy link
Contributor Author

cpovirk commented Dec 6, 2017

Thanks! I've updated the generated tests.

@cpovirk
Copy link
Contributor Author

cpovirk commented Dec 21, 2017

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.

@udalov udalov assigned udalov and unassigned dzharkov Dec 22, 2017
@udalov
Copy link
Member

udalov commented Dec 22, 2017

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!

@cpovirk
Copy link
Contributor Author

cpovirk commented Dec 22, 2017

Thanks. I've filed KT-21982.

@udalov
Copy link
Member

udalov commented Dec 27, 2017

Merged to master and 1.2.20. Thank you for the contribution!

@udalov udalov closed this Dec 27, 2017
@cpovirk
Copy link
Contributor Author

cpovirk commented Dec 27, 2017

And thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants