diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java index ec45041b5631be..6907f4d845118b 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java @@ -73,7 +73,7 @@ public static class StrictActionEnvOptions extends FragmentOptions { @Option( name = "incompatible_strict_action_env", oldName = "experimental_strict_action_env", - defaultValue = "false", + defaultValue = "true", documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS}, metadataTags = {OptionMetadataTag.INCOMPATIBLE_CHANGE}, diff --git a/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java b/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java index e9b43daf6cdb9a..6d61d093097d9c 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java +++ b/src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java @@ -737,8 +737,7 @@ public RemoteOutputsStrategyConverter() { + " affected actions.\n\n" + "In order to successfully use this feature, you likely want to set a custom" + " --host_platform together with --experimental_platform_in_output_dir (to normalize" - + " output prefixes) and --incompatible_strict_action_env (to normalize environment" - + " variables).") + + " output prefixes).") public Scrubber scrubber; @Option( diff --git a/src/test/shell/bazel/bazel_test_test.sh b/src/test/shell/bazel/bazel_test_test.sh index 7bd2f97ac1b741..333867208df207 100755 --- a/src/test/shell/bazel/bazel_test_test.sh +++ b/src/test/shell/bazel/bazel_test_test.sh @@ -346,7 +346,7 @@ EOF # With --action_env=PATH, the local PATH is forwarded to the test. PATH=$PATH:$PWD/scripts bazel test //testing:t1 -s --run_under=hello \ - --test_output=all >& $TEST_log || fail "Expected success" + --test_output=all --action_env=PATH >& $TEST_log || fail "Expected success" expect_log 'hello script!!! testing/t1' # We need to forward the PATH to make it work. diff --git a/src/test/shell/bazel/starlark_repository_test.sh b/src/test/shell/bazel/starlark_repository_test.sh index 1b0a7a2f5b6b47..00791c5f150097 100755 --- a/src/test/shell/bazel/starlark_repository_test.sh +++ b/src/test/shell/bazel/starlark_repository_test.sh @@ -2897,7 +2897,7 @@ EOF repo_cache_dir=$TEST_TMPDIR/repository_cache trap 'rm -rf ${repo_cache_dir}' EXIT - bazel build --repository_cache="$repo_cache_dir" \ + bazel build --repository_cache="$repo_cache_dir" --action_env=PATH \ //:unique_hashes >& $TEST_log || fail "expected bazel to succeed" assert_equals 1 "$(wc -l < bazel-bin/unique_hashes | tr -d ' ')" assert_equals $sha "$(cat bazel-bin/unique_hashes)"