Skip to content

adding scope attributes for starlark flags#546

Merged
tetromino merged 14 commits intobazelbuild:mainfrom
aranguyen:main
Oct 30, 2024
Merged

adding scope attributes for starlark flags#546
tetromino merged 14 commits intobazelbuild:mainfrom
aranguyen:main

Conversation

@aranguyen
Copy link
Contributor Author

@brandjon @tetromino this is what I've tried to update the docs

bazel build //docs/... && bazel test //docs/...

which shows test failed for //docs:docs_common_settings_doc-difftest FAILED in 2.1s

I then proceed with running bazel run //docs:update which modified docs/common_settings_doc.md. I reran the tests and they passed after that.

Is there anything else I need to do?

@tetromino tetromino merged commit e853fd4 into bazelbuild:main Oct 30, 2024
mbland added a commit to mbland/rules_scala that referenced this pull request Dec 10, 2025
Bumps the minimum `bazel_skylib` version to 1.8.0 and adds `scope =
"universal"` to the `@rules_scala_config//:scala_version` build setting.

---

The `last_green` BCR builds have been failing since
https://buildkite.com/bazel/rules-scala-scala/builds/5916.
bazelbuild/bazel@53b7cd8 flipped
`--incompatible_exclude_starlark_flags_from_exec_config` to `True`.
This stopped the `@rules_scala_config//:scala_version` build setting
from propagating to `exec` configurations per bazelbuild/bazel#26909.

This caused Bazel to ignore the `scala_version` attribute of `scala_*`
rules, causing some targets to break due to incorrect toolchain
resolution. Setting `scope = "universal"` on the config setting fixes
it, but requires `bazel_skylib` 1.8.0 to support it. This attribute
landed in
bazelbuild/bazel-skylib@e853fd4 from
bazelbuild/bazel-skylib#546.

FWIW, `--incompatible_exclude_starlark_flags_from_exec_config` and the
`scope` attribute are currently undocumented. See also:

- bazelbuild/bazel@9bf10f2
- https://github.com/bazelbuild/bazel/blob/ff3d6d0d057064e05f4503f7496ddd5a866bb5c4/src/main/java/com/google/devtools/build/lib/analysis/config/Scope.java
- https://github.com/bazelbuild/bazel/blob/ff3d6d0d057064e05f4503f7496ddd5a866bb5c4/src/main/java/com/google/devtools/build/lib/skyframe/BuildOptionsScopeFunction.java#L182-L189
- https://github.com/bazelbuild/bazel/blob/ff3d6d0d057064e05f4503f7496ddd5a866bb5c4/src/main/java/com/google/devtools/build/lib/analysis/config/CoreOptions.java#L148-L158
- https://github.com/bazelbuild/bazel/blob/ff3d6d0d057064e05f4503f7496ddd5a866bb5c4/src/main/java/com/google/devtools/build/lib/analysis/starlark/FunctionTransitionUtil.java#L234-L245
mbland added a commit to mbland/rules_scala that referenced this pull request Dec 11, 2025
Bumps the minimum `bazel_skylib` version to 1.8.0 and adds `scope =
"universal"` to the `@rules_scala_config//:scala_version` build setting.

---

The `last_green` BCR builds have been failing since
https://buildkite.com/bazel/rules-scala-scala/builds/5916.
bazelbuild/bazel@53b7cd8 flipped
`--incompatible_exclude_starlark_flags_from_exec_config` to `True`.
This stopped the `@rules_scala_config//:scala_version` build setting
from propagating to `exec` configurations per bazelbuild/bazel#26909.

This caused Bazel to ignore the `scala_version` attribute of `scala_*`
rules, causing some targets to break due to incorrect toolchain
resolution. Setting `scope = "universal"` on the config setting fixes
it, but requires `bazel_skylib` 1.8.0 to support it. This attribute
landed in
bazelbuild/bazel-skylib@e853fd4 from
bazelbuild/bazel-skylib#546.

FWIW, `--incompatible_exclude_starlark_flags_from_exec_config` and the
`scope` attribute are currently undocumented. See also:

- bazelbuild/bazel@9bf10f2
- https://github.com/bazelbuild/bazel/blob/ff3d6d0d057064e05f4503f7496ddd5a866bb5c4/src/main/java/com/google/devtools/build/lib/analysis/config/Scope.java
- https://github.com/bazelbuild/bazel/blob/ff3d6d0d057064e05f4503f7496ddd5a866bb5c4/src/main/java/com/google/devtools/build/lib/skyframe/BuildOptionsScopeFunction.java#L182-L189
- https://github.com/bazelbuild/bazel/blob/ff3d6d0d057064e05f4503f7496ddd5a866bb5c4/src/main/java/com/google/devtools/build/lib/analysis/config/CoreOptions.java#L148-L158
- https://github.com/bazelbuild/bazel/blob/ff3d6d0d057064e05f4503f7496ddd5a866bb5c4/src/main/java/com/google/devtools/build/lib/analysis/starlark/FunctionTransitionUtil.java#L234-L245
mbland added a commit to bazel-contrib/rules_scala that referenced this pull request Dec 11, 2025
Bumps the minimum `bazel_skylib` version to 1.8.0 and adds `scope =
"universal"` to the `@rules_scala_config//:scala_version` build setting.

---

The `last_green` BCR builds have been failing since
https://buildkite.com/bazel/rules-scala-scala/builds/5916.
bazelbuild/bazel@53b7cd8 flipped
`--incompatible_exclude_starlark_flags_from_exec_config` to `True`.
This stopped the `@rules_scala_config//:scala_version` build setting
from propagating to `exec` configurations per bazelbuild/bazel#26909.

This caused Bazel to ignore the `scala_version` attribute of `scala_*`
rules, causing some targets to break due to incorrect toolchain
resolution. Setting `scope = "universal"` on the config setting fixes
it, but requires `bazel_skylib` 1.8.0 to support it. This attribute
landed in
bazelbuild/bazel-skylib@e853fd4 from
bazelbuild/bazel-skylib#546.

FWIW, `--incompatible_exclude_starlark_flags_from_exec_config` and the
`scope` attribute are currently undocumented. See also:

- bazelbuild/bazel@9bf10f2
- https://github.com/bazelbuild/bazel/blob/ff3d6d0d057064e05f4503f7496ddd5a866bb5c4/src/main/java/com/google/devtools/build/lib/analysis/config/Scope.java
- https://github.com/bazelbuild/bazel/blob/ff3d6d0d057064e05f4503f7496ddd5a866bb5c4/src/main/java/com/google/devtools/build/lib/skyframe/BuildOptionsScopeFunction.java#L182-L189
- https://github.com/bazelbuild/bazel/blob/ff3d6d0d057064e05f4503f7496ddd5a866bb5c4/src/main/java/com/google/devtools/build/lib/analysis/config/CoreOptions.java#L148-L158
- https://github.com/bazelbuild/bazel/blob/ff3d6d0d057064e05f4503f7496ddd5a866bb5c4/src/main/java/com/google/devtools/build/lib/analysis/starlark/FunctionTransitionUtil.java#L234-L245
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants