-
Notifications
You must be signed in to change notification settings - Fork 63
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
Support K2 #302
Comments
K2 should work now on the latest snapshot release. Both the |
I commented on the PR as well - why not just make this project's plugin compatible? It's just a boolean property that needs to be overridden to return true |
Oh, I didn't know that was an option. Sounds good! |
Plugins must opt-in by returning Kapt is not compatible with K2 and I'm not sure it ever will be. That said, I don't think that's a blocker. I think this plugin should only apply kapt if the test using it needs kapt, not always. Would actually be a nice perf boost for tests that don't need kapt |
in much the same way that it doesn't automatically apply KSP, for instance |
It seems to me this is already the case (at least the project components don't get registered and I believe the extra call to K2JVMCompiler is skipped as well). I've been looking at the Kotlin compiler source code a bit and this property you're talking about only appears in 1.7.20-beta. Current version is 1.7.10, so I won't be able to include it in the stable release. Can you make do with the workaround until then or do you need it to test your own plugins? In that case, I'll have to make a pre-release for 1.7.20-beta. |
I don't think so, it appears to always be registered here
You can compile against 1.7.20-beta without forcing it on older consumers, no? |
Yes, but if you go into that method, it has an early exit when no annotation processors are given 😃.
Perhaps. The additional |
I took a pass at it in #306. The compileOnly approach there to avoid imposing the version works, but as I've mentioned before I think this library should just tie versions to the kotlinc version it's built against. |
Is it correct, that testing compiler-plugins/ksp-plugins for Kotlin 2.0.0 is not supported yet? |
Currently the new K2 compiler cannot even be enabled in KCT tests due to its own registrar not supporting it
It would be helpful to enable this so plugin authors can start testing their plugins.
The text was updated successfully, but these errors were encountered: