Skip to content

Commit

Permalink
Automated rollback of commit 536a166.
Browse files Browse the repository at this point in the history
*** Reason for rollback ***

Found an incremental correctness concern with build settings. Rolling back while investigating and to rollback for the bazel release

*** Original change description ***

Turn on --experimental_build_setting_api

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: 252715211
  • Loading branch information
juliexxia authored and copybara-github committed Jun 11, 2019
1 parent 0f9be45 commit 5c1005c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 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 = "true",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = OptionEffectTag.BUILD_FILE_SEMANTICS,
help =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public static Builder builderWithDefaults() {
public static final StarlarkSemantics DEFAULT_SEMANTICS =
builder()
// <== Add new options here in alphabetic order ==>
.experimentalBuildSettingApi(true)
.experimentalBuildSettingApi(false)
.experimentalCcSkylarkApiEnabledPackages(ImmutableList.of())
.experimentalAllowIncrementalRepositoryUpdates(false)
.experimentalEnableAndroidMigrationApis(false)
Expand Down
13 changes: 13 additions & 0 deletions src/test/shell/integration/starlark_configurations_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,19 @@ 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 5c1005c

Please sign in to comment.