Deprecate and hide @Nullable, @NonNull annotations to avoid name clashes with jspecify
还没有人认领这个 Issue。
评估
调研方向
该 issue 提到了 kotlin-stdlib 2.2.21、org.jetbrains.annotations.Nullable 和 NonNull、ACC_SYNTHETIC 以及 @Deprecated(level = HIDDEN),但没有提到任何 repository 文件或测试。首先定位这些注解是如何编译和发布的;完成此 issue 需要确定 Deprecation 和隐藏方案,在保留旧的运行时兼容性的同时包含发布公告。
由索引模型根据 Issue 内容生成。
描述
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)
- 主要语言
- Kotlin
- 星标
- 464
- 派生
- 73
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
JetBrains/java-annotations 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
JetBrains/java-annotations#123 ·
-
JetBrains/java-annotations#125 · 1 个 reaction · 已指派 1 人 ·
-
难度 4/5 3-5 天 新手友好度 35/100
JetBrains/java-annotations#122 · 2 条评论 ·
-
JetBrains/java-annotations#117 · 4 条评论 · 已指派 1 人 ·
-
难度 4/5 3-5 天 新手友好度 45/100
JetBrains/java-annotations#113 · 4 条评论 ·
查看 JetBrains/java-annotations 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
AAswordman/Operit#1265 · 3 条评论 ·
-
Source is down
难度 2/5 1-3 小时 新手友好度 70/100
keiyoushi/extensions-source#19317 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
acristescu/OnlineGo#216 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
libre-tube/LibreTube#8803 ·
-
难度 2/5 1-3 小时 新手友好度 75/100