Since the JSpecify adoption (#456), the three Kotlin SmokeCompileTest cases in storm-gradle-plugin fail, and with them the CI build on main. The smoke projects compile a real consumer against the installed artifacts, and the KSP-generated sources no longer compile there:
CityNullableMetamodel.kt: Type argument is not within its bounds: type parameter 'V' (of class AbstractMetamodel)
CityNullableMetamodel.kt: Type argument is not within its bounds: type parameter 'V' (of class AbstractKeyMetamodel)
CityInstantiator.kt: Class 'CityInstantiator' is not abstract and does not implement abstract member
CityInstantiator.kt: 'instantiate' overrides nothing
@NullMarked on the st.orm packages gives every unbounded type parameter an implicit non-null bound, and Kotlin 2.1+ enforces JSpecify strictly. That contradicts what the API means in three places:
V in TypedMetamodel/AbstractMetamodel/AbstractKeyMetamodel is the declared component type, and the generated <Type>NullableMetamodel chain deliberately binds it to a nullable type (City?, Ref<City>?). The parameter must declare V extends @Nullable Object.
Metamodel.getValue documents "or null if the value cannot be resolved" but now reads as returning non-null Object, so a generated nullable getValue override cannot narrow it. The return must be @Nullable Object (and KeyDelegate's delegating override with it).
Instantiator.instantiate(Object[] args) now reads as an array of non-null elements, while the arguments are canonical constructor values that include nullable components; the generated Kotlin instantiate(args: Array<Any?>) therefore overrides nothing. The parameter must be @Nullable Object[]. deconstruct has the reverse defect: @Nullable Object[] annotates the elements only, so the array reads non-null although the default returns null; it must be @Nullable Object @Nullable [].
The reactor build cannot catch this class of error: storm-kotlin builds with Kotlin 2.0 and strict JSpecify enforcement starts at 2.1; the smoke projects build with Kotlin 2.4. The smoke suite is the acceptance test.
Since the JSpecify adoption (#456), the three Kotlin
SmokeCompileTestcases in storm-gradle-plugin fail, and with them the CI build on main. The smoke projects compile a real consumer against the installed artifacts, and the KSP-generated sources no longer compile there:@NullMarkedon thest.ormpackages gives every unbounded type parameter an implicit non-null bound, and Kotlin 2.1+ enforces JSpecify strictly. That contradicts what the API means in three places:VinTypedMetamodel/AbstractMetamodel/AbstractKeyMetamodelis the declared component type, and the generated<Type>NullableMetamodelchain deliberately binds it to a nullable type (City?,Ref<City>?). The parameter must declareV extends @Nullable Object.Metamodel.getValuedocuments "or null if the value cannot be resolved" but now reads as returning non-nullObject, so a generated nullablegetValueoverride cannot narrow it. The return must be@Nullable Object(andKeyDelegate's delegating override with it).Instantiator.instantiate(Object[] args)now reads as an array of non-null elements, while the arguments are canonical constructor values that include nullable components; the generated Kotlininstantiate(args: Array<Any?>)therefore overrides nothing. The parameter must be@Nullable Object[].deconstructhas the reverse defect:@Nullable Object[]annotates the elements only, so the array reads non-null although the default returnsnull; it must be@Nullable Object @Nullable [].The reactor build cannot catch this class of error: storm-kotlin builds with Kotlin 2.0 and strict JSpecify enforcement starts at 2.1; the smoke projects build with Kotlin 2.4. The smoke suite is the acceptance test.