Skip to content

Commit

Permalink
Invert the default value of enable_build_file_sandboxing.
Browse files Browse the repository at this point in the history
Summary:
There is no reason for people to use this over the more fine grained
mechanisms for disabling it.

Test Plan:
CI
docs/soyweb-local.sh

Reviewed By: beefon

fbshipit-source-id: 1789deb
  • Loading branch information
Uri Baghin authored and facebook-github-bot committed Feb 7, 2017
1 parent 3a4b2a3 commit 453a383
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
12 changes: 4 additions & 8 deletions docs/concept/buckconfig.soy
Original file line number Diff line number Diff line change
Expand Up @@ -2341,15 +2341,11 @@ your <code>.buckjavaargs</code> file</a>:
{call buckconfig.entry}
{param section: 'project' /}
{param name: 'enable_build_file_sandboxing' /}
{param example_value: 'true' /}
{param example_value: 'false' /}
{param description}
When set to <code>true</code> (the default is <code>false</code>), Buck will put restrictions
on importing arbitrary Python modules in {call buck.build_file /}s to make it harder to
accidentally violate assumptions about determinism of BUCK files and build rules. It will be
possible to import only whitelisted or sanitized modules, unrestricted import
behavior can be restored in a context by using
<a href="{ROOT}function/allow_unsafe_import.html"> <code>allow_unsafe_import()</code> </a>
function.
When set to <code>false</code> (the default is <code>true</code>), Buck will disable restrictions
on importing arbitrary Python modules in {call buck.build_file /}s which make it harder to
accidentally violate assumptions about determinism of BUCK files and build rules.
{/param}
{/call}

Expand Down
2 changes: 1 addition & 1 deletion src/com/facebook/buck/parser/AbstractParserConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public ApplyDefaultFlavorsMode getDefaultFlavorsMode() {

@Value.Lazy
public boolean getEnableBuildFileSandboxing() {
return getDelegate().getBooleanValue("project", "enable_build_file_sandboxing", false);
return getDelegate().getBooleanValue("project", "enable_build_file_sandboxing", true);
}

@Value.Lazy
Expand Down
2 changes: 1 addition & 1 deletion test/com/facebook/buck/parser/ParserConfigTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public void shouldGetReadOnlyDirs() throws IOException {

@Test
public void testGetEnableBuildFileSandboxing() throws IOException {
assertFalse(
assertTrue(
FakeBuckConfig.builder().build().getView(ParserConfig.class)
.getEnableBuildFileSandboxing());

Expand Down

0 comments on commit 453a383

Please sign in to comment.