- Notifications
You must be signed in to change notification settings - Fork4.3k
Open
Description
Description of the bug:
Specifically
| functiontest_disallowed_commands_after_focus() { |
The test can be reduced to the below for a minimal repro:
bazel build //${pkg}:g|| fail"expected to succeed"bazel info|| fail"expected to succeed"bazel build //${pkg}:g|| fail"expected to succeed"
@mai93 showed that removing these lines fixes the test:
bazel/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java
Lines 671 to 680 ince6bdd1
| optionsParser.parse( | |
| PriorityCategory.RC_FILE, | |
| "module resolution", | |
| env | |
| .getSkyframeExecutor() | |
| .getFlagAliases(reporter,removePyFragment,removeBazelPyFragment) | |
| .entrySet() | |
| .stream() | |
| .map(e ->String.format("--flag_alias=%s=%s",e.getKey(),e.getValue())) | |
| .collect(toImmutableList())); |
Even with those lines removed, reproducing at the command line shows strange behavior:
$ mkdir testapp$ cat> testapp/BUILD<<EOFload("@rules_shell//shell:sh_test.bzl", "sh_test")sh_test( name = "g", srcs = ["in.sh"],)EOF$ cat> testapp/in.sh<<EOFexit 0 <<EOF$ chmod u+x testapp/in.sh$ cat > g.blazerc <<EOFbuild --experimental_enable_skyfocusbuild --genrule_strategy=localtest --test_strategy=standalonetest --strategy=TestRunner=localEOF# Use bazel@head with the lines removed as described above:# Fails:$ b/bazel5 clean --expunge; b/bazel5 --bazelrc=g.blazerc build //testapp:g; b/bazel5 --bazelrc=g.blazerc build //testapp:gERROR: Skyfocus detected changes outside of the active directories. These files/directories must be added to the active directories./usr/local/google/home/gregce/bazel/bazel2/bazel/# Passes:$ b/bazel5 shutdown; b/bazel5 --bazelrc=g.blazerc build //testapp:g; b/bazel5 --bazelrc=g.blazerc build //testapp:gINFO: Build completed successfully, 1 total action
It's unclear whyshutdown works whenclean --expunge fails given the latter also callsshutdown.
Which category does this issue belong to?
No response
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
No response
Which operating system are you running Bazel on?
Linux
What is the output ofbazel info release?
dev version: described above
Ifbazel info release returnsdevelopment version or(@non-git), tell us how you built Bazel.
No response
What's the output ofgit remote get-url origin; git rev-parse HEAD ?
git@github.com:gregestren/bazel.gitf19c53ba41c295b3ba750e1793ec2d9c1821de5fIf this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
But note the interactive behavior described above occurs even with this commit reverted.
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
Discovered in#27498.