fix cache corruption during automake

This commit is contained in:
Eugene Zhuravlev
2012-04-23 18:27:59 +02:00
parent 55ae4fb56b
commit 5a4aa28137
3 changed files with 9 additions and 1 deletions
@@ -17,6 +17,7 @@ package com.intellij.compiler;
import com.intellij.ProjectTopics;
import com.intellij.application.options.PathMacrosImpl;
import com.intellij.compiler.impl.CompileDriver;
import com.intellij.compiler.server.impl.CompileServerClasspathManager;
import com.intellij.execution.ExecutionException;
import com.intellij.execution.configurations.GeneralCommandLine;
@@ -163,6 +164,9 @@ public class CompileServerManager implements ApplicationComponent{
}
private boolean shouldTriggerMake(List<? extends VFileEvent> events) {
if (!CompileDriver.OUT_OF_PROCESS_MAKE_AS_SERVER) {
return false;
}
for (VFileEvent event : events) {
if (event.isFromRefresh() || event.getRequestor() instanceof SavingRequestor) {
return true;
@@ -107,7 +107,7 @@ public class CompileDriver {
private static final Logger LOG = Logger.getInstance("#com.intellij.compiler.impl.CompileDriver");
// to be used in tests only for debug output
public static volatile boolean ourDebugMode = false;
private static final boolean OUT_OF_PROCESS_MAKE_AS_SERVER = true; // out-of-process make implementation switch (server / per-project build process)
public static final boolean OUT_OF_PROCESS_MAKE_AS_SERVER = true; // out-of-process make implementation switch (server / per-project build process)
private final Project myProject;
private final Map<Pair<IntermediateOutputCompiler, Module>, Pair<VirtualFile, VirtualFile>> myGenerationCompilerModuleToOutputDirMap; // [IntermediateOutputCompiler, Module] -> [ProductionSources, TestSources]
@@ -18,6 +18,7 @@ package com.intellij.compiler.server;
import com.intellij.ProjectTopics;
import com.intellij.application.options.PathMacrosImpl;
import com.intellij.compiler.CompilerWorkspaceConfiguration;
import com.intellij.compiler.impl.CompileDriver;
import com.intellij.compiler.server.impl.CompileServerClasspathManager;
import com.intellij.execution.ExecutionException;
import com.intellij.execution.configurations.GeneralCommandLine;
@@ -177,6 +178,9 @@ public class BuildManager implements ApplicationComponent{
}
private boolean shouldTriggerMake(List<? extends VFileEvent> events) {
if (CompileDriver.OUT_OF_PROCESS_MAKE_AS_SERVER) {
return false;
}
for (VFileEvent event : events) {
if (event.isFromRefresh() || event.getRequestor() instanceof SavingRequestor) {
return true;