Skip to content

Commit

Permalink
Turn on --experimental_build_setting_api
Browse files Browse the repository at this point in the history
RELNOTES: Turn on --experimental_build_setting_api by default for starlark build settings (see https://docs.bazel.build/versions/master/skylark/config.html#user-defined-build-settings for more info)

SKIP_CI=blaze is borked
PiperOrigin-RevId: 250788338
  • Loading branch information
juliexxia authored and copybara-github committed May 30, 2019
1 parent a626990 commit 536a166
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public class StarlarkSemanticsOptions extends OptionsBase implements Serializabl

@Option(
name = "experimental_build_setting_api",
defaultValue = "false",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = OptionEffectTag.BUILD_FILE_SEMANTICS,
help =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public static Builder builderWithDefaults() {
public static final StarlarkSemantics DEFAULT_SEMANTICS =
builder()
// <== Add new options here in alphabetic order ==>
.experimentalBuildSettingApi(false)
.experimentalBuildSettingApi(true)
.experimentalCcSkylarkApiEnabledPackages(ImmutableList.of())
.experimentalAllowIncrementalRepositoryUpdates(false)
.experimentalEnableAndroidMigrationApis(false)
Expand Down
13 changes: 0 additions & 13 deletions src/test/shell/integration/starlark_configurations_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,19 +161,6 @@ function test_dont_parse_flags_after_dash_dash() {
expect_log "invalid package name '-//test_dont_parse_flags_after_dash_dash'"
}

function test_doesnt_work_without_experimental_flag() {
local -r pkg=$FUNCNAME
mkdir -p $pkg

write_build_setting_bzl

bazel build //$pkg:my_drink --//$pkg:type=coffee > output 2>"$TEST_log" \
&& fail "Expected failure"

expect_log "Error loading option //$pkg:type:"
expect_log "Extension file '$pkg/build_setting.bzl' has errors"
}

function test_multiple_starlark_flags() {
local -r pkg=$FUNCNAME
mkdir -p $pkg
Expand Down

0 comments on commit 536a166

Please sign in to comment.