Priority
Normal
Type
Bug 
State
Won't fix 
Assignee
Eugene Zhuravlev 
Subsystem
Compiling Project 
Affected versions
Fixed in
Fixed in build
Next build 
Visible to
All Users 
  • Submitted by   Andrew Perepelytsya
    2 years ago (13 Mar 2007 22:20)
  • Updated by Andrew Perepelytsya
    2 years ago (14 Mar 2007 21:17)
  • Jira: IDEA-11927
    (history, comments)

IDEA-11927

Incremental compilation does not work

0

Attachments

Added by <no user>
16 Sep 2009
recompiling.jpg   (515 KB)

IDEA keeps recompiling the full project after clicking on Make Project. See the screenshot for the message (output as info?!). There were absolutely no changes in the code, once a compilation is finished, another click on Make Project performs a full rebuild.

I did try full rebuild as well, no luck.
Deleted compiler and jar caches in IDEA system folders - all the same.

The problem has been encountered in previous EAP build as well. I also remember this same problem making Demetra builds unusable.

Issue was resolved
Comments (9)
 
History (0)
 
Linked Issues (0)
 
Andrew Perepelytsya
  Andrew Perepelytsya
13 Mar 2007 22:56
(2 years ago)
#
I found the following - it works ok for projects created 'manually', that is, the dependencies are provided in a large project-scoped library and all modules use it (and any module interdependencies).

For the case in question, the dependencies are configured differently. m2 idea plugin generates project and module files. Any module interdependencies are properly generated. Any 3rd-party libraries are added each module individually. This way, e.g. there could be multiple caches of the same library for different modules.

I think something is not working properly with change detection for those.
Andrew Perepelytsya
  Andrew Perepelytsya
13 Mar 2007 23:57
(2 years ago)
#
I further managed to localize the problem. I found that if there's a project library missing somewhere, the CompileDirty action triggers a full rebuild. The stacktrace below shows the error with a GroovyJ plugin installed. Naturally, I made a conclusion it was throwing a severe error due to API changes and falsely triggered a rebuild.

However after uninstalling the plugin the problem didn't go. Carefully scanning the project dependency structure (around 70 modules) I found that one of the modules had GroovyJ plugin library dependency (it's a set of libs at the global level). Only after this one had been removed did it start working properly without recompiling everything.

The issue can be reclassified then as 'broken (missing) dependency falsely triggers a full project rebuild'. Still extremely annoying, I can't think of any scenario where it would be a desired behavior.

{panel}
[4054943] ERROR - plication.impl.ApplicationImpl -
java.lang.RuntimeException: java.lang.NoSuchMethodError: com.intellij.openapi.compiler.ex.CompilerPathsEx.getCompilationClasspath(Lcom/intellij/openapi/module/Module;)Ljava/lang/String;
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:765)
at com.intellij.compiler.impl.CompileDriver.access$400(CompileDriver.java:704)
at com.intellij.compiler.impl.CompileDriver$5$1.run(CompileDriver.java:2)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:10)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:51)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:16)
at com.intellij.compiler.impl.CompileDriver$5.run(CompileDriver.java:1)
at com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:2)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:5)
Caused by: java.lang.NoSuchMethodError: com.intellij.openapi.compiler.ex.CompilerPathsEx.getCompilationClasspath(Lcom/intellij/openapi/module/Module;)Ljava/lang/String;
at org.codehaus.groovy.intellij.irida.IridaAPI.getCompilationClasspath(IridaAPI.java:35)
at org.codehaus.groovy.intellij.compiler.GroovyCompiler.createCompilationUnit(GroovyCompiler.java:132)
at org.codehaus.groovy.intellij.compiler.GroovyCompiler.createCompilationUnits(GroovyCompiler.java:116)
at org.codehaus.groovy.intellij.compiler.GroovyCompiler.findOrCreateCompilationUnits(GroovyCompiler.java:110)
at org.codehaus.groovy.intellij.compiler.GroovyCompiler.mapModulesToSourceAndTestCompilationUnits(GroovyCompiler.java:96)
at org.codehaus.groovy.intellij.compiler.GroovyCompiler.compile(GroovyCompiler.java:83)
at org.codehaus.groovy.intellij.compiler.GroovyCompiler.access$000(GroovyCompiler.java:49)
at org.codehaus.groovy.intellij.compiler.GroovyCompiler$1.run(GroovyCompiler.java:74)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:148)
at org.codehaus.groovy.intellij.compiler.GroovyCompiler.compile(GroovyCompiler.java:72)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:128)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:281)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:32)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:134)
... 14 more
[4054974] ERROR - plication.impl.ApplicationImpl - IntelliJ IDEA (Selena) #6755 Build #6755
[4054974] ERROR - plication.impl.ApplicationImpl - JDK: 1.6.0
[4054974] ERROR - plication.impl.ApplicationImpl - VM: Java HotSpot(TM) Client VM
[4054974] ERROR - plication.impl.ApplicationImpl - Vendor: Sun Microsystems Inc.
[4054974] ERROR - plication.impl.ApplicationImpl - OS: Windows XP
[4054974] ERROR - plication.impl.ApplicationImpl - Last Action: CompileDirty
[4054974] ERROR - plication.impl.ApplicationImpl - Original exception:
java.lang.NoSuchMethodError: com.intellij.openapi.compiler.ex.CompilerPathsEx.getCompilationClasspath(Lcom/intellij/openapi/module/Module;)Ljava/lang/String;
at org.codehaus.groovy.intellij.irida.IridaAPI.getCompilationClasspath(IridaAPI.java:35)
at org.codehaus.groovy.intellij.compiler.GroovyCompiler.createCompilationUnit(GroovyCompiler.java:132)
at org.codehaus.groovy.intellij.compiler.GroovyCompiler.createCompilationUnits(GroovyCompiler.java:116)
at org.codehaus.groovy.intellij.compiler.GroovyCompiler.findOrCreateCompilationUnits(GroovyCompiler.java:110)
at org.codehaus.groovy.intellij.compiler.GroovyCompiler.mapModulesToSourceAndTestCompilationUnits(GroovyCompiler.java:96)
at org.codehaus.groovy.intellij.compiler.GroovyCompiler.compile(GroovyCompiler.java:83)
at org.codehaus.groovy.intellij.compiler.GroovyCompiler.access$000(GroovyCompiler.java:49)
at org.codehaus.groovy.intellij.compiler.GroovyCompiler$1.run(GroovyCompiler.java:74)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:148)
at org.codehaus.groovy.intellij.compiler.GroovyCompiler.compile(GroovyCompiler.java:72)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:128)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:281)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:32)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:134)
at com.intellij.compiler.impl.CompileDriver.access$400(CompileDriver.java:704)
at com.intellij.compiler.impl.CompileDriver$5$1.run(CompileDriver.java:2)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:10)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:51)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:16)
at com.intellij.compiler.impl.CompileDriver$5.run(CompileDriver.java:1)
at com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:2)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:5)
{panel}
Eugene Zhuravlev
  Eugene Zhuravlev
14 Mar 2007 15:07
(2 years ago)
#
According to the stacktrace, the problem is in the outdated Groovy plugin (the plugin is compiled against the outdated API). Please contact its developers for the fix.
Andrew Perepelytsya
  Andrew Perepelytsya
14 Mar 2007 16:39
(2 years ago)
#
Eugene,

Please take time to read my comments carefully. I've uninstalled the plugin after that stacktrace. It's not the plugin, it's the way broken dependencies alter the dirty flag (maybe exception handling is flawed).
Eugene Zhuravlev
  Eugene Zhuravlev
14 Mar 2007 17:07
(2 years ago)
#
Sorry Andrew, did not notice that.
Still it is not understandable how missing dependencies can break the compilation. Do you have any exceptions in the log file with GrooveJ uninstalled (but with dependencies in the project config preserved)?
Andrew Perepelytsya
  Andrew Perepelytsya
14 Mar 2007 18:09
(2 years ago)
#
Eugene,

I have some good and bad news. The good news is that the problem have been localized to the following:

  1. Install GroovyJ plugin into Selena (download v0.1.9 from http://plugins.intellij.net/plugin/?id=260 and copy into the plugins folder)
  2. Make the project - an error above is logged and it makes the recompilation flag dirty, a full rebuild commences.
  3. Uninstall the plugin (note it hasn't been added to any of the modules). After restarting IDEA a global library created by the plugin is still there (!)
  4. Make the project again - a full rebuild is triggered again (!) . The log contains only this:
2007-03-14 11:01:24,754 [ 36578] INFO - vfs.impl.jar.JarFileSystemImpl - Jar file C:\Documents and Settings\caperep.NA\.IntelliJIdea70\config\plugins\groovyj\lib\commons-cli-1.0.jar not found
2007-03-14 11:01:24,754 [ 36578] INFO - vfs.impl.jar.JarFileSystemImpl - Jar file C:\Documents and Settings\caperep.NA\.IntelliJIdea70\config\plugins\groovyj\lib\groovy-all-1.0.jar not found
2007-03-14 11:01:24,785 [ 36609] INFO - vfs.impl.jar.JarFileSystemImpl - Jar file C:\Documents and Settings\caperep.NA\.IntelliJIdea70\config\plugins\groovyj\lib\groovy-all-1.0.jar not found
2007-03-14 11:01:24,785 [ 36609] INFO - vfs.impl.jar.JarFileSystemImpl - Jar file C:\Documents and Settings\caperep.NA\.IntelliJIdea70\config\plugins\groovyj\lib\commons-cli-1.0.jar not found
2007-03-14 11:01:24,785 [ 36609] INFO - vfs.impl.jar.JarFileSystemImpl - Jar file C:\Documents and Settings\caperep.NA\.IntelliJIdea70\config\plugins\groovyj\lib\groovy-all-1.0.jar not found
2007-03-14 11:01:24,785 [ 36609] INFO - vfs.impl.jar.JarFileSystemImpl - Jar file C:\Documents and Settings\caperep.NA\.IntelliJIdea70\config\plugins\groovyj\lib\commons-cli-1.0.jar not found

Make the project again - incremental compilation is back.


So, the problem is really with the:
  1. Plugin Manager, which doesn't cleanup everything (or are there any callbacks the plugin has to implement?)
  2. Stale plugin caches, which trigger recompilation even after plugin has been removed.

I'll follow up with the plugin authors, and this issue can be renamed now, I think.
Eugene Zhuravlev
  Eugene Zhuravlev
14 Mar 2007 20:15
(2 years ago)
#
Plugin Manager, which doesn't cleanup everything (or are there any callbacks the plugin has to implement?)


The plugin manager can't clean the libraries added by another plugin since such libraries doesn't differ from those added "manually". Also, auto-cleaning would be undesirable because that way projects, opened with IDEA without plugin installed, would be modified ("cleaned up"), and this is not a disirable behaviour for the projects that do rely on plugin presence.

Stale plugin caches, which trigger recompilation even after plugin has been removed.


The reason is different: last compilation did not finish normally since plugin was installed and after restarting without the plugin the next compilation will always be "rebuild", no surprise here.
Andrew Perepelytsya
  Andrew Perepelytsya
14 Mar 2007 20:22
(2 years ago)
#
The reason is different: last compilation did not finish normally since plugin was installed and after restarting without the plugin the next compilation will always be "rebuild", no surprise here.


Well, no. The compilation barks and complains, but it does full rebuild, and the project successfully compiles. Thus the statement _didn't complete properly_ simply does not hold true.
Eugene Zhuravlev
  Eugene Zhuravlev
14 Mar 2007 21:17
(2 years ago)
#
It does corrupt caches (or they are not saved properly), this next time they are accessed, an exception is thrown, caches are considered corrupted and full rebuild is triggered.