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

Incremental processing breaks when a project dependency is modified #2252

Closed
DennisTsar opened this issue Dec 6, 2024 · 0 comments · Fixed by #2314
Closed

Incremental processing breaks when a project dependency is modified #2252

DennisTsar opened this issue Dec 6, 2024 · 0 comments · Fixed by #2314
Milestone

Comments

@DennisTsar
Copy link
Contributor

Beginning with KSP 2.1.0-1.0.28, we began observing that, after making a change to a project dependency and recompiling, our KSP processor would receive no input files (resolver.getAllFiles() is empty) and thus fail to generate the expected output.

After cleaning the project and rebuilding, the correct inputs are passed to the KSP processor and the project builds as expected.

Repro Steps

$ git clone https://github.com/DennisTsar/bug-reports
$ cd bug-reports
$ git checkout kotlin/ksp/incremental-2.1.0

And then follow the instructions in the README

Other observations

Some observations I made while investigating the issue:

  • Disabling KSP incremental processing with ksp.incremental=false fixes the issue, even though the processor uses Dependencies.ALL_FILES
  • The issue does not occur for the JS target with KSP 2.0.21-1.0.28 but does occur with KSP 2.1.0-1.0.28. On the JVM target, it has been present for longer
  • Enabling KSP2 resolves the issue for the JS target but not for the JVM target
  • Similarly, disabling non packed Klibs with the flag kotlin.internal.klibs.non-packed=false resolves the issue for the JS target but not for the JVM target

This may be a duplicate of #1694, though that issue references a JVM only project.

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