Starlark Transition Composition #22019
Replies: 5 comments 31 replies
-
I am overall very supportive of this addition, it would help clean up a bunch of indirections required to combine an exec transition with a non-exec transition.
What if the second transition in
Now that there is |
Beta Was this translation helpful? Give feedback.
-
Nit: I don't like using the plus Could we use a different operator? If it's not allowed in Starlark, I'm ok with a new built-in function as well. |
Beta Was this translation helpful? Give feedback.
-
Pushed an update to clarify the precise semantics. @fmeum, I know you were interested, let me know if this is more clear. |
Beta Was this translation helpful? Give feedback.
-
LGTM on latest revision. |
Beta Was this translation helpful? Give feedback.
-
More than a year later, an update: I started trying to implement this last year, and was swamped by the intersection of transition semantics and the underlying Java types used for To recap, the semantics and types involved:
Except almost all of those statements are false. Native transitions use those types, and can correctly distinguish patch transitions from split transitions. Starlark transitions are all instances of Trying to implement a version of A useful first step to regularize the types involved: trying to express the transition semantics with Java types doesn't work, and so changing everything to use the Starlark API-style distinction between "transition implementation" and "transition usage" is probably worth doing. I'd like to resume tackling this in the future, but it's fairly unclear when. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We've had native transition composition for a long time, let's make that available to Starlark users!
Design proposal here: https://github.com/bazelbuild/proposals/blob/main/designs/2024-04-16-transition-composition.md
Tagging @gregestren as reviewer, but anyone with comments feel free to contribute.
Beta Was this translation helpful? Give feedback.
All reactions