mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix race condition: close compiler caches before sending notification that build finished
This commit is contained in:
@@ -626,6 +626,8 @@ public class CompileDriver {
|
||||
LOG.error(e); // todo
|
||||
}
|
||||
finally {
|
||||
CompilerCacheManager.getInstance(myProject).flushCaches();
|
||||
|
||||
final long duration = notifyCompilationCompleted(compileContext, callback, COMPILE_SERVER_BUILD_STATUS.get(compileContext));
|
||||
CompilerUtil.logDuration(
|
||||
"\tCOMPILATION FINISHED (BUILD PROCESS); Errors: " +
|
||||
@@ -635,8 +637,6 @@ public class CompileDriver {
|
||||
duration
|
||||
);
|
||||
|
||||
CompilerCacheManager.getInstance(myProject).flushCaches();
|
||||
|
||||
// refresh on output roots is required in order for the order enumerator to see all roots via VFS
|
||||
final Set<File> outputs = new HashSet<File>();
|
||||
for (final String path : CompilerPathsEx.getOutputPaths(ModuleManager.getInstance(myProject).getModules())) {
|
||||
@@ -668,7 +668,6 @@ public class CompileDriver {
|
||||
doCompile(compileContext, isRebuild, forceCompile, callback, checkCachesVersion);
|
||||
}
|
||||
finally {
|
||||
CompilerCacheManager.getInstance(myProject).flushCaches();
|
||||
FileUtil.delete(CompilerPaths.getRebuildMarkerFile(myProject));
|
||||
}
|
||||
}
|
||||
@@ -737,6 +736,7 @@ public class CompileDriver {
|
||||
}
|
||||
finally {
|
||||
dropDependencyCache(compileContext);
|
||||
CompilerCacheManager.getInstance(myProject).flushCaches();
|
||||
if (compileContext.isRebuildRequested()) {
|
||||
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
|
||||
Reference in New Issue
Block a user