intellij icon indicating copy to clipboard operation
intellij copied to clipboard

Kotlin KSP generated code not resolving

Open ianb-pomelo opened this issue 2 years ago • 4 comments

Description of the bug:

When updating the plugin from v2023.10.24.0.2-api-version-232 to v2023.11.07, Intellij no longer is able to resolve Kotlin code generated via KSP. The code compiles fine but it is not accessible in the IDE. KAPT generated code works as intended

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Use the KSP demo app and sync the target

Which Intellij IDE are you using? Please provide the specific version.

Intellij Ultimate 2023.2.5

What programming languages and tools are you using? Please provide specific versions.

Kotlin 1.7, Bazel 5.4.0, Bazel Kotlin Rules 1.8.1

What Bazel plugin version are you using?

v2023.11.07

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

Intellij is running on Apple Silicon Macs

ianb-pomelo avatar Nov 27 '23 20:11 ianb-pomelo

seems specifically that the *intellij-info.txt is missing a:

java_ide_info {
  generated_jars {
    jar {
      ...
      relative_path: "path/to/code/*-kt.jar"
    }
...
}

for the ksp related plugin code (which was present for kapt).

not sure if the plugin version is related and instead may just be stale ide info enabling discovery of the jar and updating invalided it

rob-pomelo avatar Nov 28 '23 04:11 rob-pomelo

@ianb-pomelo is this a regression in version v2023.11.07 or it was already broken before that?

mai93 avatar Dec 05 '23 21:12 mai93

It worked when I used version v2023.10.24.0.2-api-version-232 and broke when I upgraded but when I tried to rollback and install v2023.10.24 via file it didn't work either so I'm not sure if it was a regression introduced by 11.07 or not

ianb-pomelo avatar Dec 05 '23 23:12 ianb-pomelo

Thank you for contributing to the IntelliJ repository! This issue has been marked as stale since it has not had any activity in the last 6 months. It will be closed in the next 14 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.

github-actions[bot] avatar Jun 19 '24 02:06 github-actions[bot]

This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please post @bazelbuild/triage in a comment here and we'll take a look. Thanks!

github-actions[bot] avatar Jul 04 '24 02:07 github-actions[bot]