No-op: change written default scope from 'universal' to 'target' (#608) No-op because BuildOptionsScopeFunction#getScopeType forces scope to `"default"` if the scope value wasn't specified explicitly. See https://github.com/bazelbuild/bazel/issues/26909
diff --git a/docs/common_settings_doc.md b/docs/common_settings_doc.md index 318b09a..20b5b2f 100755 --- a/docs/common_settings_doc.md +++ b/docs/common_settings_doc.md
@@ -26,7 +26,7 @@ | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | <a id="bool_flag-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | | -| <a id="bool_flag-scope"></a>scope | The scope indicates where a flag can propagate to | String | optional | `"universal"` | +| <a id="bool_flag-scope"></a>scope | The scope indicates where a flag can propagate to | String | optional | `"target"` | <a id="bool_setting"></a> @@ -47,7 +47,7 @@ | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | <a id="bool_setting-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | | -| <a id="bool_setting-scope"></a>scope | The scope indicates where a flag can propagate to | String | optional | `"universal"` | +| <a id="bool_setting-scope"></a>scope | The scope indicates where a flag can propagate to | String | optional | `"target"` | <a id="int_flag"></a> @@ -69,7 +69,7 @@ | :------------- | :------------- | :------------- | :------------- | :------------- | | <a id="int_flag-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | | | <a id="int_flag-make_variable"></a>make_variable | If set, the build setting's value will be available as a Make variable with this name in the attributes of rules that list this build setting in their 'toolchains' attribute. | String | optional | `""` | -| <a id="int_flag-scope"></a>scope | The scope indicates where a flag can propagate to | String | optional | `"universal"` | +| <a id="int_flag-scope"></a>scope | The scope indicates where a flag can propagate to | String | optional | `"target"` | <a id="int_setting"></a> @@ -91,7 +91,7 @@ | :------------- | :------------- | :------------- | :------------- | :------------- | | <a id="int_setting-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | | | <a id="int_setting-make_variable"></a>make_variable | If set, the build setting's value will be available as a Make variable with this name in the attributes of rules that list this build setting in their 'toolchains' attribute. | String | optional | `""` | -| <a id="int_setting-scope"></a>scope | The scope indicates where a flag can propagate to | String | optional | `"universal"` | +| <a id="int_setting-scope"></a>scope | The scope indicates where a flag can propagate to | String | optional | `"target"` | <a id="repeatable_string_flag"></a> @@ -112,7 +112,7 @@ | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | <a id="repeatable_string_flag-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | | -| <a id="repeatable_string_flag-scope"></a>scope | The scope indicates where a flag can propagate to | String | optional | `"universal"` | +| <a id="repeatable_string_flag-scope"></a>scope | The scope indicates where a flag can propagate to | String | optional | `"target"` | <a id="string_flag"></a> @@ -134,7 +134,7 @@ | :------------- | :------------- | :------------- | :------------- | :------------- | | <a id="string_flag-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | | | <a id="string_flag-make_variable"></a>make_variable | If set, the build setting's value will be available as a Make variable with this name in the attributes of rules that list this build setting in their 'toolchains' attribute. | String | optional | `""` | -| <a id="string_flag-scope"></a>scope | The scope indicates where a flag can propagate to | String | optional | `"universal"` | +| <a id="string_flag-scope"></a>scope | The scope indicates where a flag can propagate to | String | optional | `"target"` | | <a id="string_flag-values"></a>values | The list of allowed values for this setting. An error is raised if any other value is given. | List of strings | optional | `[]` | @@ -156,7 +156,7 @@ | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | <a id="string_list_flag-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | | -| <a id="string_list_flag-scope"></a>scope | The scope indicates where a flag can propagate to | String | optional | `"universal"` | +| <a id="string_list_flag-scope"></a>scope | The scope indicates where a flag can propagate to | String | optional | `"target"` | <a id="string_list_setting"></a> @@ -177,7 +177,7 @@ | Name | Description | Type | Mandatory | Default | | :------------- | :------------- | :------------- | :------------- | :------------- | | <a id="string_list_setting-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | | -| <a id="string_list_setting-scope"></a>scope | The scope indicates where a flag can propagate to | String | optional | `"universal"` | +| <a id="string_list_setting-scope"></a>scope | The scope indicates where a flag can propagate to | String | optional | `"target"` | <a id="string_setting"></a> @@ -199,7 +199,7 @@ | :------------- | :------------- | :------------- | :------------- | :------------- | | <a id="string_setting-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | | | <a id="string_setting-make_variable"></a>make_variable | If set, the build setting's value will be available as a Make variable with this name in the attributes of rules that list this build setting in their 'toolchains' attribute. | String | optional | `""` | -| <a id="string_setting-scope"></a>scope | The scope indicates where a flag can propagate to | String | optional | `"universal"` | +| <a id="string_setting-scope"></a>scope | The scope indicates where a flag can propagate to | String | optional | `"target"` | | <a id="string_setting-values"></a>values | The list of allowed values for this setting. An error is raised if any other value is given. | List of strings | optional | `[]` |
diff --git a/rules/common_settings.bzl b/rules/common_settings.bzl index f61358a..cec6043 100644 --- a/rules/common_settings.bzl +++ b/rules/common_settings.bzl
@@ -38,7 +38,7 @@ _SCOPE_ATTR = attr.string( doc = "The scope indicates where a flag can propagate to", - default = "universal", + default = "target", ) def _is_valid_make_variable_char(c):