For JavaLib.java is annotated with @ANNO2. When used as a lib from another src
- KSP1: you can see KSAnnotation.origin of this @ANNO2 is JAVA_LIB
- KSP2: you can see KSAnnotation.origin of this @ANNO2 is KOTLIN_LIB
Notice this started in KSP2 since Kotlin 2.1.0 and persist in master branch
Repro
acejingbo@0344381
- KSP1: Run: :compiler-plugin:test and KSPCompilerPluginTest > testLibOrigins() PASSED
- KSP2: Run :kotlin-analysis-api:test and KSPAATest > testLibOrigins() FAILED with following difference

For JavaLib.java is annotated with @ANNO2. When used as a lib from another src
Notice this started in KSP2 since Kotlin 2.1.0 and persist in master branch
Repro
acejingbo@0344381