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

For transitions on label build settings, the value doesn't go through repo mapping #15728

Closed
Wyverald opened this issue Jun 22, 2022 · 4 comments
Assignees
Labels
area-Bzlmod Bzlmod-specific PRs, issues, and feature requests P2 We'll consider working on this in future. (Assignee optional) team-Configurability platforms, toolchains, cquery, select(), config transitions team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: bug

Comments

@Wyverald
Copy link
Member

See https://github.com/Wyverald/bazel-label-transition-test

Basically, when defining a transition:

def _tr_impl(settings, attr):
  return {
    "@repo//:setting":  # goes through repo mapping
      "@repo//:target",  # does NOT go through repo mapping
  }

tr = transition(
  implementation = _tr_impl,
  inputs = [],
  outputs = ["@repo//:setting"],  # goes through repo mapping
)
@Wyverald Wyverald added type: bug P2 We'll consider working on this in future. (Assignee optional) team-Configurability platforms, toolchains, cquery, select(), config transitions team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. area-Bzlmod Bzlmod-specific PRs, issues, and feature requests labels Jun 22, 2022
@Wyverald Wyverald self-assigned this Jun 22, 2022
@Wyverald
Copy link
Member Author

cc @katre

@katre
Copy link
Member

katre commented Jun 22, 2022

Thanks! How critical is this for your work? I see you've set this as a P2 already, is that accurate?

@Wyverald
Copy link
Member Author

Ah don't worry, I'll try to fix this (as part of the greater effort to fix #14852). Just need to think about how, is all...

@katre
Copy link
Member

katre commented Jun 22, 2022

SGTM, let me know if I can assist.

Wyverald added a commit that referenced this issue Jul 12, 2022
*** Reason for rollback ***

#15728 and #14852 have been fixed

*** Original change description ***

Automated rollback of commit 5de967b.

*** Reason for rollback ***

Temporarily rolling back until #14852 is fixed.

*** Original change description ***

Use the proper main repo mapping where appropriate

Use the main repo mapping (instead of ALWAYS_FALLBACK) to a) process .bzl load labels in the WORKSPACE file, and b) to process any labels passed to repo rules in either the WORKSPACE file or WORKSPACE-loaded macros.

This change...

***

PiperOrigin-RevId: 460471895
Change-Id: I60be60120aff003ebdb0d8d44ef82d412d81af92
copybara-service bot pushed a commit that referenced this issue Jul 13, 2022
*** Reason for rollback ***

#15728 and #14852 have been fixed

*** Original change description ***

Automated rollback of commit 5de967b.

*** Reason for rollback ***

Temporarily rolling back until #14852 is fixed.

*** Original change description ***

Use the proper main repo mapping where appropriate

Use the main repo mapping (instead of ALWAYS_FALLBACK) to a) process .bzl load labels in the WORKSPACE file, and b) to process any labels passed to repo rules in either the WORKSPACE file or WORKSPACE-loaded macros.

This change...

***

PiperOrigin-RevId: 460696618
Change-Id: I60be60120aff003ebdb0d8d44ef82d412d81af92
aranguyen pushed a commit to aranguyen/bazel that referenced this issue Jul 20, 2022
Fixes bazelbuild#15728

All Starlark option values are just stored as Objects with the type not easily accessible, but we could look at the type of the existing flag and deduce whether it's a label-typed setting (the only such type is a Label; there's no label-list build setting yet).

PiperOrigin-RevId: 460471433
Change-Id: If9660d43a22278b245380ed0f9b38d95d71ebba0
aranguyen pushed a commit to aranguyen/bazel that referenced this issue Jul 20, 2022
*** Reason for rollback ***

bazelbuild#15728 and bazelbuild#14852 have been fixed

*** Original change description ***

Automated rollback of commit 5de967b.

*** Reason for rollback ***

Temporarily rolling back until bazelbuild#14852 is fixed.

*** Original change description ***

Use the proper main repo mapping where appropriate

Use the main repo mapping (instead of ALWAYS_FALLBACK) to a) process .bzl load labels in the WORKSPACE file, and b) to process any labels passed to repo rules in either the WORKSPACE file or WORKSPACE-loaded macros.

This change...

***

PiperOrigin-RevId: 460696618
Change-Id: I60be60120aff003ebdb0d8d44ef82d412d81af92
aranguyen pushed a commit to aranguyen/bazel that referenced this issue Jul 20, 2022
Fixes bazelbuild#15728

All Starlark option values are just stored as Objects with the type not easily accessible, but we could look at the type of the existing flag and deduce whether it's a label-typed setting (the only such type is a Label; there's no label-list build setting yet).

PiperOrigin-RevId: 460471433
Change-Id: If9660d43a22278b245380ed0f9b38d95d71ebba0
aranguyen pushed a commit to aranguyen/bazel that referenced this issue Jul 20, 2022
*** Reason for rollback ***

bazelbuild#15728 and bazelbuild#14852 have been fixed

*** Original change description ***

Automated rollback of commit 5de967b.

*** Reason for rollback ***

Temporarily rolling back until bazelbuild#14852 is fixed.

*** Original change description ***

Use the proper main repo mapping where appropriate

Use the main repo mapping (instead of ALWAYS_FALLBACK) to a) process .bzl load labels in the WORKSPACE file, and b) to process any labels passed to repo rules in either the WORKSPACE file or WORKSPACE-loaded macros.

This change...

***

PiperOrigin-RevId: 460696618
Change-Id: I60be60120aff003ebdb0d8d44ef82d412d81af92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Bzlmod Bzlmod-specific PRs, issues, and feature requests P2 We'll consider working on this in future. (Assignee optional) team-Configurability platforms, toolchains, cquery, select(), config transitions team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: bug
Projects
None yet
Development

No branches or pull requests

2 participants