8000 [KSP2] Annotation and argument's origin is wrong · Issue #2412 · google/ksp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[KSP2] Annotation and argument's origin is wrong #2412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
acejingbo opened this issue Apr 11, 2025 · 1 comment · Fixed by #2424
Closed

[KSP2] Annotation and argument's origin is wrong #2412

acejingbo opened this issue Apr 11, 2025 · 1 comment · Fixed by #2424
Milestone

Comments

@acejingbo
Copy link
acejingbo commented Apr 11, 2025

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
    Image
@acejingbo
Copy link
Author

@ting-yuan Big thanks for solving the issues very quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0