#What is this org.jspecify.annotations.NullnessUnspecified?

1 messages · Page 1 of 1 (latest)

amber fox
#

I am combing through Kotlin source code for Java annotations that it supports, and one peculiar one caught my eye: https://github.com/JetBrains/kotlin/blob/master/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/JvmAnnotationNames.kt

The file mentions a certain org.jspecify.annotations.NullnessUnspecified, which does not exist within the JSpecify annotations package: https://jspecify.dev/docs/api/org/jspecify/annotations/package-summary.html

It was also not marked as an old annotation either, and is grouped together with the other existing annotations? What's going on? Can someone help unravel this mystery for me?

GitHub

The Kotlin Programming Language. . Contribute to JetBrains/kotlin development by creating an account on GitHub.

idle estuaryBOT
#

<@&1008423204219531294> please have a look, thanks.

civic topaz
amber fox
#

Huh wow, so it exists in the code, but not in the documentation? Weird

#

Wait hold on

amber fox
# civic topaz https://github.com/JetBrains/kotlin/blob/master/third-party/java8-annotations/or...

isnt this the actual annotations page: https://github.com/jspecify/jspecify/tree/main/src/main/java/org/jspecify/annotations

it seems Kotlin just copied the annotations over to their own repo and invented one out of thin air?

GitHub

An artifact of fully-specified annotations to power static-analysis checks, beginning with nullness analysis. - jspecify/jspecify

#

i am so lost and confused, what the hell is going on

civic topaz
#

It depends on where you're looking. Normally your IDE allows you to click through.

amber fox
#

click through? I dont understand what this means

#

I know many IDE have their own tooling to support the nullability issue

#

but I dont get how Kotlin can create an annotation out of thin air, and then pretend like it came from JSpecify

#

when the official JSpecify has no such annotation named @NullnessUnspecified

amber fox
#

Thank you, but this does not answer my question

dreamy tree
#

@NullUnmarked is the actual one

#

JSPECIFY_OLD_NULLNESS_UNSPECIFIED_ANNOTATION_FQ_NAME

#

its even called that

amber fox
# dreamy tree `JSPECIFY_OLD_NULLNESS_UNSPECIFIED_ANNOTATION_FQ_NAME`

wait, I think you were looking at org.jspecify.nullness.NullnessUnspecified

the one I meant was:

val JSPECIFY_NULLNESS_UNSPECIFIED_ANNOTATION_FQ_NAME = FqName("org.jspecify.annotations.NullnessUnspecified")

It was grouped together with the other currently present annotations. Could it actually be a mistake on their side?

dreamy tree
#

huh

#

yeah probably

#

since its not in jspecify at all

#

make an issue on the jspecify repo

amber fox