Skip to content

Commit

Permalink
Flip the flag "--incompatible_disallow_data_transition"
Browse files Browse the repository at this point in the history
https://docs.bazel.build/versions/master/skylark/backward-compatibility.html#disallow-cfg--data

Fixes #6153

RELNOTES: `--incompatible_disallow_data_transition` is now enabled by default
PiperOrigin-RevId: 229150949
  • Loading branch information
laurentlb authored and Copybara-Service committed Jan 14, 2019
1 parent f44d947 commit f674a59
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion site/docs/skylark/backward-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ When `--incompatible_disallow_data_transition=true`, builds using this syntax
fail with an error.

* Flag: `--incompatible_disallow_data_transition`
* Default: `false`
* Default: `true`
* Introduced in: `0.16.0`
* Tracking issue: [#6153](https://github.com/bazelbuild/bazel/issues/6153)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,15 +245,14 @@ public class SkylarkSemanticsOptions extends OptionsBase implements Serializable

@Option(
name = "incompatible_disallow_data_transition",
defaultValue = "false",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.SKYLARK_SEMANTICS,
effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS},
metadataTags = {
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
},
help = "If set to true, rule attributes cannot set 'cfg = \"data\"', which is a noop."
)
help = "If set to true, rule attributes cannot set 'cfg = \"data\"', which is a noop.")
public boolean incompatibleDisallowDataTransition;

@Option(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public static Builder builderWithDefaults() {
.incompatibleDepsetUnion(false)
.incompatibleDisableDeprecatedAttrParams(false)
.incompatibleDisableObjcProviderResources(false)
.incompatibleDisallowDataTransition(false)
.incompatibleDisallowDataTransition(true)
.incompatibleDisallowDictPlus(false)
.incompatibleDisallowFileType(false)
.incompatibleDisallowLegacyJavaProvider(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ public void testExecutableGetsInRunfilesAndFilesToBuild() throws Exception {
" return struct(runfiles = rf)",
"",
"custom_rule = rule(implementation = custom_rule_impl, executable = True,",
" attrs = {'data': attr.label_list(cfg='data', allow_files=True)})");
" attrs = {'data': attr.label_list(allow_files=True)})");

scratch.file(
"test/skylark/BUILD",
Expand Down

0 comments on commit f674a59

Please sign in to comment.