Selectively Enabling Execution Platforms #22170
Replies: 5 comments 12 replies
-
First question: I'm not wild about the name Any suggestions on naming would be very appreciated! |
Beta Was this translation helpful? Give feedback.
-
Does this apply to |
Beta Was this translation helpful? Give feedback.
-
Doesn't this depend on the order of registration? Is that what "is registered before the other" means? |
Beta Was this translation helpful? Give feedback.
-
This makes the argument for separating out exec resolution logic into something else stronger. I think of platforms as a bag of properties for a machine you want your build to interact with. It's a nice abstraction to keep: simple, straightforward, universal. How we integrate with platforms is its own logic. It's weird to add API support to that effect that only triggers under certain scenarios that are technically separate from the platform definition itself. That creates ambiguities like what Tom asked above. Similarly, if someone uses the same platform for target binaries and build execution, is it weird if it has Thinking through #22000 more, could it make sense to have
It's yet another abstraction. But that logic has to live somewhere. I realize you're not trying to address that just yet. To be constructive here I'd love to understand what our end API goal is. My current assertion is that resolution logic principally belongs somewhere else, and we keep platforms as just a bag of properties. Any holes there? Do platform-based flags already disrupt that idea? |
Beta Was this translation helpful? Give feedback.
-
This is a sensible proposal that enables exec platform selection to be more flexible, thus letting users build with more variety of exec platforms more easily. We previously saw that folks would rather modify the exec_properties on the target-level to override the exec platform's properties so that they would not have to deal with multiple platforms. I think the downside of this approach is that: this is yet, another migration. Currently, in the Open Source Bazel ecosystem, we see that folks are still migrating off I suspect we would also need similar information with regarding to |
Beta Was this translation helpful? Give feedback.
-
Execution platforms are currently either registered or not registered, as opposed to toolchains, which can be selectively enabled via the
target_settings
attribute.This proposal is to add a new attribute on
platform
, calledenabled_settings
, to perform the same purpose.See the full proposal here: https://github.com/bazelbuild/proposals/blob/main/designs/2024-04-26-platform-exec-settings.md
This is based on my previous question about executions platforms, #22000, but I don't want to try the migration to split the platform and execution platform concepts yet.
Adding @gregestren as reviewer, but I am always interested in comments and suggestions.
Beta Was this translation helpful? Give feedback.
All reactions