JetBrains / JetBrains/java-annotations
Deprecate and hide @Nullable, @NonNull annotations to avoid name clashes with jspecify
- Ngôn ngữ chính
- Kotlin
- Star
- 463
- Fork
- 72
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Currently, `org.jetbrains.kotlin:kotlin-stdlib:2.2.21` depends on `org.jetbrains:annotations`, so it brings `org.jetbrains.annotations.Nullable` to IDE autocomplete.
The ecosystem moves towards https://jspecify.dev/, so it would be nice if you could deprecate and hide `@Nullable` and `@NonNull` annotations.
Deprecation is straightforward: `@Deprecated` + release announcement.
Hiding would probably involve adding `ACC_SYNTHETIC` modifier after the compilation. It would still keep the class in the bytecode, so the old libraries would still work fine in the runtime, while the new clients would need to move to a different nullability annotations.
An alternative option could be to rewrite `@Nullable` annotation in Kotlin and use `@Deprecated(level = HIDDEN)`
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.