| Priority |
Normal |
| Type | Bug |
| State | Won't fix |
| Assignee | Eugene Zhuravlev |
| Subsystem | Compiling Project |
| Affected versions |
No affected versions
|
| Fixed in |
No fix versions
|
| Fixed in build |
Next build |
| Visible to | All Users |
|
Incremental compilation does not work |
|
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.
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}
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).
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)?
I have some good and bad news. The good news is that the problem have been localized to the following:
- Install GroovyJ plugin into Selena (download v0.1.9 from http://plugins.intellij.net/plugin/?id=260 and copy into the plugins folder)
- Make the project - an error above is logged and it makes the recompilation flag dirty, a full rebuild commences.
- 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 (!)
- 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 found2007-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:
- Plugin Manager, which doesn't cleanup everything (or are there any callbacks the plugin has to implement?)
- 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.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.
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.