Skip to content
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

JDeps compiler plugin doesn't work under the new k2 compiler #843

Closed
rockwotj opened this issue Oct 10, 2022 · 7 comments
Closed

JDeps compiler plugin doesn't work under the new k2 compiler #843

rockwotj opened this issue Oct 10, 2022 · 7 comments

Comments

@rockwotj
Copy link
Contributor

I tried to play with the new k2 compiler now that in 1.7.20 the abi-gen plugin is supported, but the jdeps plugin needs to be updated to support k2. Here is the error that I get:

warning: ATTENTION!
 This build uses experimental K2 compiler:
  -Xuse-k2
error: there are some plugins incompatible with K2 compiler:
  io.bazel.kotlin.plugin.jdeps.JdepsGenComponentRegistrar
Please remove -Xuse-k2

From the kotlin slack, it seems that the rough guide for k2 plugins are here. Mostly we need to switch JdepsGenExtension from AnalysisHandlerExtension to FirExtension

@rockwotj
Copy link
Contributor Author

rockwotj commented Oct 11, 2022

Seems like this will be possible once https://youtrack.jetbrains.com/issue/KT-51982 is done. I wonder if it's possible switch the plugin to KSP...

@Bencodes
Copy link
Collaborator

@rockwotj are you able to take a look at fixing up the jdeps plugin so that it supports K2?

@rockwotj
Copy link
Contributor Author

@rockwotj are you able to take a look at fixing up the jdeps plugin so that it supports K2?

I am hoping to have time, but note that it isn't possible right now until k2 has support for KSP.

@jbarr21
Copy link
Contributor

jbarr21 commented Apr 4, 2024

has anyone taken up this work now that Kotlin 2.0 is in Beta5?

@rockwotj
Copy link
Contributor Author

rockwotj commented Apr 4, 2024

Unlikely, I at least no longer work on a Kotlin codebase and won't be able to look into this.

@rockwotj
Copy link
Contributor Author

Looks like this is fixed

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

No branches or pull requests

4 participants