aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/pkgcache
diff options
context:
space:
mode:
authorGravatar Ulf Adams <ulfjack@google.com>2016-10-14 14:20:31 +0000
committerGravatar Yun Peng <pcloudy@google.com>2016-10-14 20:25:05 +0000
commitde14adebfcc0d66ff48aec9ace3a4d36343200f5 (patch)
tree21505128f8d0aacf9379e1ca378f0c9814f8e410 /src/test/java/com/google/devtools/build/lib/pkgcache
parent8d0be8960e49e09c0cbcc8173ce538edfa3cb208 (diff)
Make --watchfs a common command option.
Adding an options parameter to DiffAwareness#getCurrentView seems like the simplest way to achieve that. Alternatives considered: 1. Making the diff awareness modules stateful. However, I did not want to do so as I've also been working on improving the module API to reduce state, or at least to have a proper lifecycle management for any necessary state. 2. Making the watchFs flag a constructor parameter. However, that would also invalidate any implementations that don't use the flag (of which we have several). 3. Only passing in a single boolean flag instead of an options class provider; however, this is a more principled, futureproof API, which allows other modules / awareness implementations to use their own options. RELNOTES: --watchfs is now a command option; the startup option of the same name is deprecated. I.e., use bazel build --watchfs, not blaze --watchfs build. -- MOS_MIGRATED_REVID=136154395
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/pkgcache')
-rw-r--r--src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java b/src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java
index c137cd3dff..32e8b4b30a 100644
--- a/src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java
+++ b/src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java
@@ -57,6 +57,7 @@ import com.google.devtools.build.lib.vfs.inmemoryfs.InMemoryFileSystem;
import com.google.devtools.build.skyframe.SkyFunction;
import com.google.devtools.build.skyframe.SkyFunctionName;
import com.google.devtools.common.options.Options;
+import com.google.devtools.common.options.OptionsClassProvider;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
@@ -411,7 +412,7 @@ public class IncrementalLoadingTest {
private View currentView;
@Override
- public View getCurrentView() {
+ public View getCurrentView(OptionsClassProvider options) {
lastView = currentView;
currentView = new View() {};
return currentView;