aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/standalone
diff options
context:
space:
mode:
authorGravatar Yue Gan <yueg@google.com>2016-10-12 12:09:38 +0000
committerGravatar Yue Gan <yueg@google.com>2016-10-12 12:12:25 +0000
commitf695c54a8f5f6be7adb678d305005f78e4b44424 (patch)
tree7054f8c6c618ed053941b9c300427c0ec5eb5a00 /src/main/java/com/google/devtools/build/lib/standalone
parentd38ee63c6402819b9c01637e7176e03ad2296314 (diff)
Automated [] rollback of commit e898023ffc6c47a27312c4d3659dbeeccdb3cd37.
*** Reason for rollback *** Make darwin sandboxing default again. *** Original change description *** Fix #1849: Sandboxing on OS X should be turned off by default for 0.3.2. This restructures the way we set the default Spawn strategy so that each BlazeModule supplying a SpawnActionContext has an ActionContextConsumer that sets its own SpawnActionContext as the default, with the BazelRulesModule being put as the last module loaded in BazelMain, so that it can override that decision - it only does, if the user explicitly specifies a --spawn_strategy flag. IMHO this is a much saner approach than... *** ROLLBACK_OF=134770427 RELNOTES: Darwin sandboxing is default. -- MOS_MIGRATED_REVID=135905657
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/standalone')
-rw-r--r--src/main/java/com/google/devtools/build/lib/standalone/StandaloneActionContextConsumer.java44
-rw-r--r--src/main/java/com/google/devtools/build/lib/standalone/StandaloneModule.java8
2 files changed, 0 insertions, 52 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/standalone/StandaloneActionContextConsumer.java b/src/main/java/com/google/devtools/build/lib/standalone/StandaloneActionContextConsumer.java
deleted file mode 100644
index beb1125475..0000000000
--- a/src/main/java/com/google/devtools/build/lib/standalone/StandaloneActionContextConsumer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2016 The Bazel Authors. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.devtools.build.lib.standalone;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableMultimap;
-import com.google.common.collect.Multimap;
-import com.google.devtools.build.lib.actions.ActionContextConsumer;
-import com.google.devtools.build.lib.actions.Executor.ActionContext;
-import com.google.devtools.build.lib.actions.SpawnActionContext;
-
-/**
- * {@link ActionContextConsumer} that requests the action contexts necessary for standalone
- * execution.
- */
-public class StandaloneActionContextConsumer implements ActionContextConsumer {
-
- @Override
- public ImmutableMap<String, String> getSpawnActionContexts() {
- // This makes the "sandboxed" strategy the default Spawn strategy, unless it is overridden by a
- // later BlazeModule.
- return ImmutableMap.of("", "standalone");
- }
-
- @Override
- public Multimap<Class<? extends ActionContext>, String> getActionContexts() {
- // This makes the "standalone" strategy available via --spawn_strategy=standalone, but it is not
- // necessarily the default.
- return ImmutableMultimap.<Class<? extends ActionContext>, String>of(
- SpawnActionContext.class, "standalone");
- }
-}
diff --git a/src/main/java/com/google/devtools/build/lib/standalone/StandaloneModule.java b/src/main/java/com/google/devtools/build/lib/standalone/StandaloneModule.java
index 58145b0ad3..a8118ea367 100644
--- a/src/main/java/com/google/devtools/build/lib/standalone/StandaloneModule.java
+++ b/src/main/java/com/google/devtools/build/lib/standalone/StandaloneModule.java
@@ -15,14 +15,12 @@ package com.google.devtools.build.lib.standalone;
import com.google.common.collect.ImmutableList;
import com.google.common.eventbus.Subscribe;
-import com.google.devtools.build.lib.actions.ActionContextConsumer;
import com.google.devtools.build.lib.actions.ActionContextProvider;
import com.google.devtools.build.lib.buildtool.BuildRequest;
import com.google.devtools.build.lib.buildtool.buildevent.BuildStartingEvent;
import com.google.devtools.build.lib.runtime.BlazeModule;
import com.google.devtools.build.lib.runtime.Command;
import com.google.devtools.build.lib.runtime.CommandEnvironment;
-import com.google.devtools.build.lib.util.Preconditions;
/**
* StandaloneModule provides pluggable functionality for blaze.
@@ -32,12 +30,6 @@ public class StandaloneModule extends BlazeModule {
private BuildRequest buildRequest;
@Override
- public Iterable<ActionContextConsumer> getActionContextConsumers() {
- Preconditions.checkNotNull(env);
- return ImmutableList.<ActionContextConsumer>of(new StandaloneActionContextConsumer());
- }
-
- @Override
public Iterable<ActionContextProvider> getActionContextProviders() {
return ImmutableList.<ActionContextProvider>of(
new StandaloneActionContextProvider(env, buildRequest));