Tell incremental compiler everything is up to date

Answered

I have a really big project - to compile it from the scratch it takes ~15 minutes. 

My usual workflow is to build my app with maven, deploy it locally and later use hot reloading of classes whenever i change something. 

To get hot reloading working  I need to initially recompile my project from the IDE and then I can use incremental compilation feature and it works perfectly. What I would like to improve is to skip that initial compilation in the IDE. After building everything with maven I already have my .class files (recompiling in Intellij gives me exactly same .class files).

I did some research and from what I understand Intellij incremental compiler stores compilation times somehow internally and then use that to tell whether something needs recompiling or not. 

So currently I'm looking for some way to tell Intellij compiler everything is up to date(preferably if I could do that from maven), please update your internal storage and track new changes from there. Are you folks aware of any way I could achieve that? 

0
3 comments
Avatar
Permanently deleted user

ok, I see, is it possible to make it possible? With some maybe plugin?

0

While performing compilation, IDE builds the index to track the dependencies and perform incremental compile in the future.

If there is no index, compiler doesn't know which parts should be recompiled. It's not enough to have the .class files produced by Maven.

So, you can't skip the initial compilation in the IDE since it's essential to have the dependencies index to perform accurate incremental builds.

0

Please sign in to leave a comment.