Skip to content

Commit e697ff7

Browse files
hofbicopybara-github
authored andcommitted
Flip incompatible_strict_action_env
Work towards bazel-contrib/SIG-rules-authors#42. Fixes #7026 Closes #26587. PiperOrigin-RevId: 831944371 Change-Id: I397faa463a709b2367d5a6eebc678077c4029bbb
1 parent 924b6aa commit e697ff7

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public static class StrictActionEnvOptions extends FragmentOptions {
7373
@Option(
7474
name = "incompatible_strict_action_env",
7575
oldName = "experimental_strict_action_env",
76-
defaultValue = "false",
76+
defaultValue = "true",
7777
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
7878
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
7979
metadataTags = {OptionMetadataTag.INCOMPATIBLE_CHANGE},

src/main/java/com/google/devtools/build/lib/remote/options/RemoteOptions.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -737,8 +737,7 @@ public RemoteOutputsStrategyConverter() {
737737
+ " affected actions.\n\n"
738738
+ "In order to successfully use this feature, you likely want to set a custom"
739739
+ " --host_platform together with --experimental_platform_in_output_dir (to normalize"
740-
+ " output prefixes) and --incompatible_strict_action_env (to normalize environment"
741-
+ " variables).")
740+
+ " output prefixes).")
742741
public Scrubber scrubber;
743742

744743
@Option(

src/test/shell/bazel/bazel_test_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ EOF
346346

347347
# With --action_env=PATH, the local PATH is forwarded to the test.
348348
PATH=$PATH:$PWD/scripts bazel test //testing:t1 -s --run_under=hello \
349-
--test_output=all >& $TEST_log || fail "Expected success"
349+
--test_output=all --action_env=PATH >& $TEST_log || fail "Expected success"
350350
expect_log 'hello script!!! testing/t1'
351351

352352
# We need to forward the PATH to make it work.

src/test/shell/bazel/starlark_repository_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2897,7 +2897,7 @@ EOF
28972897

28982898
repo_cache_dir=$TEST_TMPDIR/repository_cache
28992899
trap 'rm -rf ${repo_cache_dir}' EXIT
2900-
bazel build --repository_cache="$repo_cache_dir" \
2900+
bazel build --repository_cache="$repo_cache_dir" --action_env=PATH \
29012901
//:unique_hashes >& $TEST_log || fail "expected bazel to succeed"
29022902
assert_equals 1 "$(wc -l < bazel-bin/unique_hashes | tr -d ' ')"
29032903
assert_equals $sha "$(cat bazel-bin/unique_hashes)"

0 commit comments

Comments
 (0)