[Proposal] Global default exec_groups

Skip to first unread message

Susan Steinman

Jul 7, 2022, 3:01:20 PMJul 7
to bazel-dev
I've added a new proposal for exposing default exec_groups representing the most common platform constraints. We're planning on exposing default exec_groups internally, and were wondering whether this feature should also exist in Bazel.


Ivo Ristovski List

Jul 8, 2022, 8:06:00 AMJul 8
to Susan Steinman, bazel-dev
A stupid question. Why don’t we add exec_compatible_with to ctx.actions.run? The user could specify platform constraint directly there. There would be no need for global ones and functions running an action would not need to update rule definition, leading to better architecture of the rules. 

Is there a caveat and something needs to happen with all global definitions before the rule is processed?

You received this message because you are subscribed to the Google Groups "bazel-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-dev/0d9ef25c-e388-4cb5-979d-0f0b2d4c3462n%40googlegroups.com.

Ivo List | Software Engineer | il...@google.com | 

John Cater

Jul 8, 2022, 8:35:11 AMJul 8
to Ivo Ristovski List, Susan Steinman, bazel-dev
Adding the exec constraints at the action level is too late: the execution platform is determined during toolchain resolution, _before_ the rule implementation is invoked. The exec constraints are used to inform toolchain resolution about what sort of execution platforms are acceptable.

By the time the rule implementation is invoked, Bazel needs to have already decided on things like available toolchain implementations and what the execution platform is (for each exec group).

Tony Aiuto

Aug 8, 2022, 4:42:28 PMAug 8
to John Cater, Ivo Ristovski List, Susan Steinman, bazel-dev
Was there any closure on this?

Susan Steinman

Aug 9, 2022, 3:01:50 AMAug 9
to Tony Aiuto, John Cater, Ivo Ristovski List, bazel-dev
Working plan is to go ahead with the design.
Reply all
Reply to author
0 new messages