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

Upgrade JSpecify 0.2.0 -> 0.3.0 #4059

Conversation

Stephan202
Copy link
Contributor

The removed org.jspecify.nullness package is still supported where
possible, but NullnessUtils#pickNullableAnnotation now falls back to
suggesting org.jspecify.annotations.Nullable.

See:

The removed `org.jspecify.nullness` package is still supported where
possible, but `NullnessUtils#pickNullableAnnotation` now falls back to
suggesting `org.jspecify.annotations.Nullable`.

See:
- https://github.com/jspecify/jspecify/releases/tag/v0.3.0-alpha-1
- https://github.com/jspecify/jspecify/releases/tag/v0.3.0-alpha-2
- https://github.com/jspecify/jspecify/releases/tag/v0.3.0-alpha-3
- https://github.com/jspecify/jspecify/releases/tag/v0.3.0
- jspecify/jspecify@v0.2.0...v0.3.0
@@ -353,7 +354,7 @@ private static NullableAnnotationToUse pickNullableAnnotation(VisitorState state
.orElse(
state.isAndroidCompatible()
? "androidx.annotation.Nullable"
: "org.jspecify.nullness.Nullable");
: "org.jspecify.annotations.Nullable");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I filed this PR because an Error Prone suggested fix introduced a org.jspecify.nullness.Nullable usage, while our project uses JSpecify 0.3.0. This caused a build failure. Since version 0.3.0 has been out for more than 8 months it doesn't seem unreasonable to prefer it over the older 0.2.0 release.

@cpovirk cpovirk self-assigned this Sep 5, 2023
copybara-service bot pushed a commit that referenced this pull request Sep 6, 2023
The removed `org.jspecify.nullness` package is still supported where
possible, but `NullnessUtils#pickNullableAnnotation` now falls back to
suggesting `org.jspecify.annotations.Nullable`.

See:
- https://github.com/jspecify/jspecify/releases/tag/v0.3.0-alpha-1
- https://github.com/jspecify/jspecify/releases/tag/v0.3.0-alpha-2
- https://github.com/jspecify/jspecify/releases/tag/v0.3.0-alpha-3
- https://github.com/jspecify/jspecify/releases/tag/v0.3.0
- jspecify/jspecify@v0.2.0...v0.3.0

Fixes #4059

RELNOTES=n/a
PiperOrigin-RevId: 562772958
@copybara-service copybara-service bot closed this in 2fea215 Sep 6, 2023
@Stephan202 Stephan202 deleted the sschroevers/migrate-to-jspecify-0.3.0 branch September 6, 2023 20:05
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.

2 participants