diff --git a/site/docs/remote-caching.md b/site/docs/remote-caching.md index 15b09d4a3b2363..e25f30b017ca4f 100644 --- a/site/docs/remote-caching.md +++ b/site/docs/remote-caching.md @@ -333,12 +333,6 @@ You can pass a user-specific path to the `--disk_cache` flag using the `~` alias when enabling the disk cache for all developers of a project via the project's checked in `.bazelrc` file. -To enable cache hits across different workspaces, use the following flag: - -``` -build --experimental_strict_action_env -``` - ## Known issues **Input file modification during a build** @@ -353,15 +347,14 @@ build. **Environment variables leaking into an action** -An action definition contains environment variables. This can be a problem -for sharing remote cache hits across machines. For example, environments -with different `$PATH` variables won't share cache hits. You can specify -`--experimental_strict_action_env` to ensure that that's not the case and -that only environment variables explicitly whitelisted via `--action_env` -are included in an action definition. Bazel's Debian/Ubuntu package used -to install `/etc/bazel.bazelrc` with a whitelist of environment variables -including `$PATH`. If you are getting fewer cache hits than expected, check -that your environment doesn't have an old `/etc/bazel.bazelrc` file. +An action definition contains environment variables. This can be a problem for +sharing remote cache hits across machines. For example, environments with +different `$PATH` variables won't share cache hits. Only environment variables +explicitly whitelisted via `--action_env` are included in an action +definition. Bazel's Debian/Ubuntu package used to install `/etc/bazel.bazelrc` +with a whitelist of environment variables including `$PATH`. If you are getting +fewer cache hits than expected, check that your environment doesn't have an old +`/etc/bazel.bazelrc` file. **Bazel does not track tools outside a workspace** 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 44101edfd97d31..8771b96eeddcd4 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 @@ -111,7 +111,7 @@ public class BazelRuleClassProvider { public static class StrictActionEnvOptions extends FragmentOptions { @Option( name = "experimental_strict_action_env", - defaultValue = "false", + defaultValue = "true", documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS}, help = diff --git a/src/test/py/bazel/windows_remote_test.py b/src/test/py/bazel/windows_remote_test.py index a717b035819e67..e10bd3c39bb7cb 100644 --- a/src/test/py/bazel/windows_remote_test.py +++ b/src/test/py/bazel/windows_remote_test.py @@ -33,7 +33,6 @@ def _RunRemoteBazel(self, args, env_remove=None, env_add=None): '--define=EXECUTOR=remote', '--remote_executor=localhost:' + str(self._worker_port), '--remote_cache=localhost:' + str(self._worker_port), - '--experimental_strict_action_env=true', '--remote_timeout=3600', '--auth_enabled=false', '--remote_accept_cached=false',