mirror of
https://github.com/apple/pkl.git
synced 2026-05-25 08:09:17 +02:00
Make codegen default to jspecify NonNull annotations (#1607)
With JSpecify now a dependency of pkl-config-java, this moves the non-null annotation to jspecify's. This makes it simpler for users to do nullness checks, as tooling already understands JSpecify nullness annotations.
This commit is contained in:
@@ -198,7 +198,7 @@ For Spring Boot applications, and for users of `pkl-config-java` compiling the g
|
||||
.--non-null-annotation
|
||||
[%collapsible]
|
||||
====
|
||||
Default: `org.pkl.config.java.mapper.NonNull` +
|
||||
Default: `org.jspecify.annotations.NonNull` +
|
||||
Fully qualified name of the annotation type to use for annotating non-null types. +
|
||||
The specified annotation type must be annotated with `@java.lang.annotation.Target(ElementType.TYPE_USE)`
|
||||
or the generated code may not compile.
|
||||
|
||||
@@ -423,7 +423,7 @@ For Spring Boot applications, and for users of `pkl-config-java` compiling the g
|
||||
.nonNullAnnotation: Property<String>
|
||||
[%collapsible]
|
||||
====
|
||||
Default: `"org.pkl.config.java.mapper.NonNull"` +
|
||||
Default: `"org.jspecify.annotations.NonNull"` +
|
||||
Example: `nonNullAnnotation = "org.project.MyAnnotation"` +
|
||||
Fully qualified name of the annotation type to use for annotating non-null types. +
|
||||
The specified annotation type must be annotated with `@java.lang.annotation.Target(ElementType.TYPE_USE)`
|
||||
|
||||
@@ -37,6 +37,10 @@ The following APIs have been removed without replacement.
|
||||
|
||||
* `org.pkl.config.java.Config#makeConfig` (pr:https://github.com/apple/pkl/pull/1531[])
|
||||
|
||||
The following APIs have been deprecated for removal.
|
||||
|
||||
* `org.pkl.config.java.mapper.NonNull` (https://github.com/apple/pkl/pull/1607[#1607]).
|
||||
|
||||
.XXX
|
||||
[%collapsible]
|
||||
====
|
||||
|
||||
Reference in New Issue
Block a user