"always scan" mode for FSState

This commit is contained in:
Eugene Zhuravlev
2012-01-27 21:10:25 +01:00
parent f72c4e8f22
commit 4e9d79b9a1
2 changed files with 10 additions and 2 deletions
@@ -24,7 +24,12 @@ public class FSState {
private volatile FilesDelta myCurrentRoundDelta;
private volatile FilesDelta myLastRoundDelta;
public FSState() {
// when true, will always determine dirty files by scanning FS and comparing timestamps
// alternatively, when false, after first scan will rely on extarnal notifications about changes
private final boolean myAlwaysScanFS;
public FSState(boolean alwaysScanFS) {
myAlwaysScanFS = alwaysScanFS;
}
public void onRebuild() {
@@ -35,6 +40,9 @@ public class FSState {
}
public boolean markInitialScanPerformed(Module module, boolean forTests) {
if (myAlwaysScanFS) {
return true;
}
final Set<Module> map = forTests ? myInitialTestsScanPerformed : myInitialProductionScanPerformed;
return map.add(module);
}
@@ -125,7 +125,7 @@ class ServerState {
pd = myProjects.get(projectPath);
if (pd == null) {
final Project project = loadProject(projectPath, params);
final FSState fsState = new FSState();
final FSState fsState = new FSState(false);
ProjectTimestamps timestamps = null;
BuildDataManager dataManager = null;
try {