-
Notifications
You must be signed in to change notification settings - Fork 211
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
Generated types not visible to IntelliJ #1102
Comments
@restingbull is a comedian |
Adding something like this to the BUILD that uses the kt_ksp_plugin "fixed" it for me:
|
Bump this thread 😄 Does anyone have a plan to implement this feature? |
Yeah I am encountering this issue trying to use the koin ksp compiler for annotation processing. I have something similar to
which produces a |
I'm stuck on this as well. Have a custom KSP processor that works fine in bazel, but intellij doesn't import the source jar. The KSP plugin is generating the source jar just fine. Not sure if this is a rules_kotlin problem, or intellij bazel problem. This can't be "the way it is"? Nobody can see the source for any ksp plugin? That seems kinda crazy. I assume my custom processor isn't doing something it should but I can't figure out what that might be. Especially as it works fine w/ gradle. @henrikpersson I don't quite understand your fix. Do you add this stub plugin to the target using the ksp plugin? or do you add it to the ksp plugin? Could you give more context/exampels? |
I don't remember and trashed the code, but I think it was something like this:
Where Empty.java
|
When running kotlin in IntelliJ, code that is generated in either ksp or kapt processors (e.g. dagger, or custom ksp) are not attached in a way that IJ can see them. They compile, but redline. This also has the effect of making the generated sources un-findable by the IDE.
Related: ksp-generated sources are not visible under bazel-out. kapt-generated sources are, under bazel-bin/path/to/library/_javac/lib/lib-java_tmp/path/to/library/GeneratedFile.java. .kt files generated by KSP are available in the deep directories, but not attached anywhere within bazel-out, so they can't even be navigated to from within the project.
While this is strictly an IntelliJ Bazel plugin issue, it seems to likely be an issue with various aspects and what info attached during rules_kotlin related actions. I'm not sure how to better describe this, but can dig into it with anyone, with examples.
The text was updated successfully, but these errors were encountered: