-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Toolchain types should be aliasable #7404
Comments
Note that once this is fixed, it would still not be expected that you can require a toolchain type under one name but retrieve it from |
This seems related to the concerns @aragos has about constraint values proliferating. |
How so? I did a cursory check, and aliasing appears to be fully transparent to constraint values and constraint settings. Or are you referring to the problem of explicitly merging two distinct constraint values that are not declared as aliases? |
I meant the latter, which won't directly involve alias rules, but which is conceptually related. |
This allows Bazel to validate toolchain types earleir, and to deal with aliases to toolchain types. Fixes bazelbuild#7404.
This allows Bazel to validate toolchain types earleir, and to deal with aliases to toolchain types. Fixes bazelbuild#7404. Closes bazelbuild#8381. PiperOrigin-RevId: 248755418
Suppose you define a
toolchain_type
with label"//pkg:tt"
, and analias
that points to it named"//tt2"
. Then you should be able to use either//pkg:tt
and//pkg:tt2
interchangeably. This is important for smooth migration oftoolchain_type
definitions from one name/package/repository to another.Currently this works for a
toolchain
target'stoolchain_type
attribute: When you specify//pkg:tt2
, it retrieves the originalToolchainTypeInfo
provider from thealias
target and sees the original//pkg:tt
label.It does not work for a rule that declares a required toolchain type of
//pkg:tt2
. The problem can be traced back to the fact that ToolchainResolutionFunction directly compares the label of the requested toolchain type, when it should instead resolve this label to a configured target and retrieve the label in theToolchainTypeInfo
provider.The text was updated successfully, but these errors were encountered: