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

Unification of self- and attribute- transitions #17848

Open
illicitonion opened this issue Mar 22, 2023 · 3 comments
Open

Unification of self- and attribute- transitions #17848

illicitonion opened this issue Mar 22, 2023 · 3 comments
Assignees
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Configurability platforms, toolchains, cquery, select(), config transitions type: feature request

Comments

@illicitonion
Copy link
Contributor

Description of the feature request:

Several rulesets have gone to somewhat hacky lengths to work around limitations of self-transitions. For instance, rules_go switched from using self transitions to using edge transitions because self transitions don’t support configurable attributes, but this has significantly increased the complexity of rules_go (e.g. the go_binary rule now has to do a copy/symlink-executable-and-forward-providers hack, as implemented also by bazel-lib’s platform_transition_binary rule). Ideally in the cases that "this target needs to be transitioned", that could reliably be applied as a self transition, rather than sometimes needing to put in place an attribute transition with hacks.

One of the root cause problems here is #15157 but there are probably others .

What underlying problem are you trying to solve with this feature?

Being able to apply a transition binaries simply without needing to hackily add complexity to the rule implementations.

Which operating system are you running Bazel on?

No response

What is the output of bazel info release?

No response

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@fmeum
Copy link
Collaborator

fmeum commented Mar 22, 2023

Another reason for staying away from self transitions even though they are conceptually simpler is that they cause the convenience symlinks to be deleted.

@pcjanzen
Copy link
Contributor

Another reason for staying away from self transitions is that they can make it difficult or impossible to effectively use target_compatible_with, see #16099

@ShreeM01 ShreeM01 added type: feature request team-Configurability platforms, toolchains, cquery, select(), config transitions untriaged labels Mar 22, 2023
@gregestren
Copy link
Contributor

#15157 is being actively worked on this quarter.

Do the last two comments reflect the remaining concerns?

@gregestren gregestren added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed untriaged labels May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Configurability platforms, toolchains, cquery, select(), config transitions type: feature request
Projects
None yet
Development

No branches or pull requests

7 participants