From 03bd0eb6ecd80f824ee8d5b028db96c43721a3b6 Mon Sep 17 00:00:00 2001 From: twerth Date: Wed, 21 Jul 2021 00:32:55 -0700 Subject: [PATCH] Deprecate `--watchfs` as startup option. Part of #13226. PiperOrigin-RevId: 385953278 --- .../devtools/build/lib/runtime/BlazeOptionHandler.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeOptionHandler.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeOptionHandler.java index febb31d667a517..57ad0283a3f0c6 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeOptionHandler.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeOptionHandler.java @@ -304,6 +304,11 @@ DetailedExitCode parseOptions(List args, ExtendedEventHandler eventHandl // Migration of --watchfs to a command option. // TODO(ulfjack): Get rid of the startup option and drop this code. if (runtime.getStartupOptionsProvider().getOptions(BlazeServerStartupOptions.class).watchFS) { + eventHandler.handle( + Event.error( + "--watchfs as startup option is deprecated, replace it with the equivalent command " + + "option. For example, instead of 'bazel --watchfs build //foo', run " + + "'bazel build --watchfs //foo'.")); try { optionsParser.parse("--watchfs"); } catch (OptionsParsingException e) {