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

What's the recommended way to work around the lack of per-target transitions? #832

Open
cbarrete opened this issue Jan 5, 2025 · 2 comments

Comments

@cbarrete
Copy link
Contributor

cbarrete commented Jan 5, 2025

https://buck2.build/docs/rule_authors/configuration_transitions/#per-target-transition states that there are no plans to add per-target transitions to Buck2.

The way that I currently work around this is to have wrapper rules that take a base dep, and just return this dep's providers and applies a transition. This works (for the most part), but it's a source of confusion and frustration for users. Is this the best we can do for now?

@cjhopman
Copy link
Contributor

cjhopman commented Mar 5, 2025

What you described seems like the best approach right now. But it's not the case that there are no plans to support per-target transitions in buck2, so there may be better ways to do this in the future.

@cbarrete
Copy link
Contributor Author

cbarrete commented Mar 7, 2025

Actually, I haven't played with them yet, but doesn't the brand new incoming transition API implement per-target transitions now?

In the meantime, I've solved my actual problem by switching to config modifiers (and thus not requiring the transitions to begin with), but I'll leave the issue open for now, as it is still generally relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants