JetBrains / JetBrains/java-annotations
Deprecate and hide @Nullable, @NonNull annotations to avoid name clashes with jspecify
- 主要语言
- Kotlin
- 星标
- 463
- 派生
- 72
- PR 合并指标
- 30 天内没有已合并 PR
描述
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)`
贡献指南
调研方向
The issue names kotlin-stdlib 2.2.21, org.jetbrains.annotations.Nullable and NonNull, ACC_SYNTHETIC, and @Deprecated(level = HIDDEN), but no repository files or tests. Start by locating how these annotations are compiled and published; completion requires a decided deprecation and hiding approach that preserves old runtime compatibility and includes the release announcement.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- kotlin
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100