Skip to content

Commit b564d14

Browse files
keithcopybara-github
authored andcommitted
Remove warnings about ignored starlark options
Neither clean nor info really make sense to have semantics changed from starlark flags, but if you have a starlark flag in your .bazelrc in the `build` section you see this warning. Closes bazelbuild#16616. PiperOrigin-RevId: 490301831 Change-Id: I659aad203cba36f7a69d92101f8fc1817b14f99a
1 parent 45197b7 commit b564d14

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java

-8
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,7 @@ public CleanCommand(OS os) {
131131
@Override
132132
public BlazeCommandResult exec(CommandEnvironment env, OptionsParsingResult options) {
133133
// Assert that there is no residue and warn about Starlark options.
134-
List<String> starlarkOptions = options.getSkippedArgs();
135134
List<String> residue = options.getResidue();
136-
if (!starlarkOptions.isEmpty()) {
137-
env.getReporter()
138-
.handle(
139-
Event.warn(
140-
"Blaze clean does not support starlark options. Ignoring options: "
141-
+ starlarkOptions));
142-
}
143135
if (!residue.isEmpty()) {
144136
String message = "Unrecognized arguments: " + Joiner.on(' ').join(residue);
145137
env.getReporter().handle(Event.error(message));

src/main/java/com/google/devtools/build/lib/runtime/commands/InfoCommand.java

-9
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,7 @@ public BlazeCommandResult exec(
189189
}
190190
}
191191

192-
List<String> starlarkOptions = optionsParsingResult.getSkippedArgs();
193192
List<String> residue = optionsParsingResult.getResidue();
194-
if (!starlarkOptions.isEmpty()) {
195-
env.getReporter()
196-
.handle(
197-
Event.warn(
198-
"info command does not support starlark options. Ignoring options: "
199-
+ starlarkOptions));
200-
}
201-
202193
env.getEventBus().post(new NoBuildEvent());
203194
if (!residue.isEmpty()) {
204195
ImmutableSet.Builder<String> unknownKeysBuilder = ImmutableSet.builder();

0 commit comments

Comments
 (0)