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

Toolchains that require toolchains don't get toolchains #13243

Closed
katre opened this issue Mar 18, 2021 · 1 comment
Closed

Toolchains that require toolchains don't get toolchains #13243

katre opened this issue Mar 18, 2021 · 1 comment
Assignees
Labels
P2 We'll consider working on this in future. (Assignee optional) team-Configurability platforms, toolchains, cquery, select(), config transitions type: bug

Comments

@katre
Copy link
Member

katre commented Mar 18, 2021

Branched from bazelbuild/rules_rust#635:

If a toolchain rule declares that it requires a toolchain type, that is currently dropped during analysis (see ConfiguredTargetFunction.computeUnloadedToolchainContexts).

There are two issues here:

  1. Only the current target should be dropped (and only in the current configuration), in order to avoid a loop. The toolchain may still need any other toolchain types it requested.
  2. If the toolchain declares toolchain types that the parent did not, those are ignored and not supplied. This may be a harder fix, but we can at least warn about it.
@katre katre added type: bug P2 We'll consider working on this in future. (Assignee optional) team-Configurability platforms, toolchains, cquery, select(), config transitions labels Mar 18, 2021
@katre katre self-assigned this Mar 18, 2021
@katre katre changed the title Toolchains the require toolchains don't get toolchains Toolchains that require toolchains don't get toolchains Mar 19, 2021
@katre
Copy link
Member Author

katre commented Mar 22, 2021

Looking into this further today, this may be a bigger problem than I thought. Continuing to dig.

katre added a commit to katre/bazel that referenced this issue Mar 22, 2021
directly require the correct execution platform.

This fixes several issues around toolchains that depend on toolchains.

Fixes bazelbuild#13243.
philwo pushed a commit that referenced this issue Apr 19, 2021
directly require the correct execution platform.

This fixes several issues around toolchains that depend on toolchains.

Fixes #13243.

Closes #13258.

PiperOrigin-RevId: 364597996
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) team-Configurability platforms, toolchains, cquery, select(), config transitions type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant