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

Add TransitionType enum and add checks that transitions aren't used #13755

Closed
wants to merge 2 commits into from

Conversation

katre
Copy link
Member

@katre katre commented Jul 27, 2021

inappropriately.

Fixes #13751.

@katre katre requested a review from gregestren July 27, 2021 18:58
@katre katre requested a review from lberki as a code owner July 27, 2021 18:58
@google-cla google-cla bot added the cla: yes label Jul 27, 2021
@gregestren
Copy link
Contributor

How do Starlark transitions fit into this? If you define a 1-1 Starlark transition and both apply it to a rule and an attribute, how does that still work? Is that because those don't show up as TransitionFactory instances in the StarlarkRuleClassFunctions object?

@gregestren
Copy link
Contributor

Oh, those are handled at

?

@katre
Copy link
Member Author

katre commented Jul 28, 2021

Right, plain transitions don't run into this workflow. There's no way to make an actual TransitionFactory instance from Starlark, so this only applies to native code.

Native factories that don't care about the data type (like the transition factory for HostTransition) can use TransitionFactory.TransitionType.ANY to indicate that.

@bazel-io bazel-io closed this in 0428828 Jul 28, 2021
@katre katre deleted the ttf-03-type-enum branch July 28, 2021 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when using exec transition as incoming rule transition
2 participants