Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.0.0]fix: export constraints.bzl file from @local_config_platform so it ca… #16698

Merged
merged 2 commits into from
Nov 8, 2022
Merged

[6.0.0]fix: export constraints.bzl file from @local_config_platform so it ca… #16698

merged 2 commits into from
Nov 8, 2022

Conversation

ShreeM01
Copy link
Contributor

@ShreeM01 ShreeM01 commented Nov 8, 2022

…n be used in downstream bzl_library targets

Downstream rule sets may depend on @local_config_platform//:constraints.bzl but when they do there is no way easy way to make that load statement compatible with bzl_library. This change makes it possible to use bzl_library on starlark code that loads from @local_config_platform//:constraints.bzl.

For example,

bzl_library(
    name = "local_config_platform_constraints",
    srcs = ["@local_config_platform//:constraints.bzl"],
)

bzl_library(
    name = "platform_utils",
    srcs = ["//lib/private:platform_utils.bzl"],
    deps = [":local_config_platform_constraints"],
)

Closes #16665.

PiperOrigin-RevId: 486957479
Change-Id: I328b7a3722aea95b3151ed88f23c277ed4154202

…n be used in downstream bzl_library targets

Downstream rule sets may depend on `@local_config_platform//:constraints.bzl` but when they do there is no way easy way to make that load statement compatible with `bzl_library`. This change makes it possible to use `bzl_library` on starlark code that loads from `@local_config_platform//:constraints.bzl`.

For example,

```
bzl_library(
    name = "local_config_platform_constraints",
    srcs = ["@local_config_platform//:constraints.bzl"],
)

bzl_library(
    name = "platform_utils",
    srcs = ["//lib/private:platform_utils.bzl"],
    deps = [":local_config_platform_constraints"],
)
```

Closes #16665.

PiperOrigin-RevId: 486957479
Change-Id: I328b7a3722aea95b3151ed88f23c277ed4154202
@ShreeM01 ShreeM01 requested a review from katre November 8, 2022 17:15
@ShreeM01 ShreeM01 enabled auto-merge (squash) November 8, 2022 17:25
@ShreeM01 ShreeM01 requested review from katre and removed request for katre November 8, 2022 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Configurability platforms, toolchains, cquery, select(), config transitions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants