-
Notifications
You must be signed in to change notification settings - Fork 60
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 compilation issues with multiple projects #465
Comments
Thanks for providing the demo project, I'll take a look. |
@cbeust I think this issue related to issue I wrote you about some weeks ago. You asked me how to reproduce it. Seems like I found what cause it. |
I've just encountered this issue with the sample project:
|
resolved with the addition of the noIncrementalKotlin flag:
|
Have issues compiling multiple mixed Java/Kotlin project on MacOs (10.12.6).
When attempting to compile the first kotlin file I see this error:
***** ERROR Error: com.beust.kobalt.KobaltException: Couldn't compile file: Source file or directory not found: /var/folders/6r/t_py7pf93ldc2q2w5rhrqd7w0000gn/T/./specification/src/main/kotlin/uk/co/strand/peabrain/specification/Flavour.kt
Running with --log 3 also shows this message:
ICReport: Possible cache corruption. Rebuilding. com.beust.kobalt.KobaltException: Couldn't compile file: import uk.co.strand.peabrain.serverbase.WorkRequest
/Users/martingittins/Technical/Projects/Private/estimatorproject/webby/serverBase/src/main/kotlin/uk/co/strand/peabrain/serverbase/gen/engine/ComputeService.kt:6:41 Unresolved reference: WorkRequest
Note that it's ComputeService.kt that is referenced here, from the second project, not Flavour.kt which is in the first project.
It looks like the source cache handling is being corrupted by other projects.
The error reported is not consistent - it seems to alternate between being in the first and second project.
It never complains about any java files, and the project builds ok with gradle and in Idea, both with default settings for incremental compilation.
I made a local Kobalt and stopped it in the debugger at the point it's calling makeIncrementally in KotlinCompiler and all the inputs looked to be as expected. In particular the sourceRoots where correct, and the cachesDir existed.
Here is a small project that demonstrates the problem. The critical requirement appears to be to have at least two projects (maybe with both Java and Kotlin and maybe be on Mac). This project is incomplete rubbish - the important point is that the cache fails to find one or more files.
Just expand this and try "./kobaltw compile"
demo.zip
The text was updated successfully, but these errors were encountered: