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

Migrate to JSpecify annotations #399

Open
1 task done
joshuasing opened this issue May 3, 2024 · 1 comment
Open
1 task done

Migrate to JSpecify annotations #399

joshuasing opened this issue May 3, 2024 · 1 comment
Assignees
Labels
contributor: needs feedback Feedback is wanted before these changes are merged size: XL status: future This might be done in the future type: enhancement This is a feature request or a pull request that adds a feature type: refactor This refactors existing code

Comments

@joshuasing
Copy link
Member

Confirmation

  • I have checked for similar issues.

Problem

JSpecify is a set of standard annotations for Java static analysis and is being developed by Google, JetBrains, Meta, SonarQube, and more.

Suggested solution

We should eventually migrate to using JSpecify annotations instead of the JetBrains @NotNull and @Nullable annotations, as JSpecify may eventually become more widely supported by editors and static analysis tools.

User guide (draft): https://jspecify.dev/docs/user-guide/
Specification (draft): https://jspecify.dev/docs/spec/

The overall change will be adding @NullMarked to all classes, removing all JetBrains @NotNull annotations and replacing all JetBrains @Nullable annotations with the JSpecify @Nullable annotaion.

Additional information

No response

@joshuasing joshuasing added type: enhancement This is a feature request or a pull request that adds a feature status: future This might be done in the future contributor: needs feedback Feedback is wanted before these changes are merged type: refactor This refactors existing code size: XL labels May 3, 2024
@LooFifteen
Copy link
Member

I don't think it's worth switching for now, Jetbrains annotations has a much larger range of annotations with a better naming scheme. I think we should stick with that for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor: needs feedback Feedback is wanted before these changes are merged size: XL status: future This might be done in the future type: enhancement This is a feature request or a pull request that adds a feature type: refactor This refactors existing code
Projects
None yet
Development

No branches or pull requests

2 participants