My project has started rebuilding all the time, e....
# intellij
n
My project has started rebuilding all the time, e.g. if I press ctrl + f9, let it finish, and then ctrl + f9 again, it will rebuild all modules, are anyone else seeing this behavior? Or know if there is some way I can output some debug info from idea to figure out why it is always rebuilding everything?
g
What is your build system?
n
gradle, but this is only happening in Idea, it only happens for our biggest kotlin project, think it started happening when we went to plugin version 1.2.60
In my build.log I am seeing some log entries like these, but not sure if they mean anything:
Copy code
2018-08-20 13:51:21,002 [  17011]   INFO - kotlin.jps.build.KotlinBuilder - Clearing lookup cache
2018-08-20 13:51:23,598 [  19607]   INFO - kotlin.jps.build.KotlinBuilder - Compiled successfully
2018-08-20 13:51:23,929 [  19938]   INFO - kotlin.jps.build.KotlinBuilder - Rebuilding all Kotlin: Kotlin global lookup map format changed
g
Those logs from JPS, internal IDEA build system So probably your project not configured correctly to use Gradle. Try to reimport. Close your project and than create project from existing sources and choose gradlem in wizard
Also, can be that your run configuration is incorrect, you can check what exactly executing with Ctrl + F9
n
Like I said, it is when using the idea build system, I doubt it has anything to do with my run configuration, happens even if I delete it. Disabling incremental compilation makes it stop compiling needless modules, but then just compiles the needed modules very slowly instead.
g
I don’t understand what you mean. You said: “gradle, but this is only happening in Idea” Apparently, if you use Gradle for your project, you should use Gradle integration in Idea instead of Idea own build system Do you have any problems with incremental compilation with Gradle from command line, if it’s fine, check that idea runs gradle task and do not use JPS. Also check option “Delegate IDE build/run actions to Gradle”
n
I do not want to use Gradle to replace the Idea buildsystem, Idea has always been faster in the past, this is a bug that has started happening from a plugin upgrade. We have been using Kotlin for this project for over 2 years. It works as expected from Gradle command line, which is why I am writing this in the #intellij channel 🙂
g
I see. Maybe it’s time to try use Gradle, most of new compiler features available there first and in general has much better support. But simple incremental compilation should work on JPS too, I suppose better to create an issue with logs on kotl.in/issue