-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
The platforms flag should be single-valued #19807
Comments
@sdtwigg We discussed this recently |
I put together a quick repro case which shows the issue we discussed. https://github.com/chaselatta/platform_bug_repro |
I remember a design doc by @brentleyjones that (if I recall correctly) gave meaning to a multi-valued |
Yes, I would like to confirm if this means we will never adopt something like my proposal. And if so, if there are any future plans at all to support multi-platform builds in a nice way? |
@brentleyjones: Your proposal was very interesting, and we may decide to take it up in the future. At this point, however, I think the best approach is the one from https://github.com/bazelbuild/proposals/blob/main/designs/2023-06-08-standard-platform-transitions.md, where the controls are in BUILD files and Starlark rules. The reason to handle this now are to reduce confusion, both for Bazel users (who frequently ask about what happens when they pass multiple values to If we decide to implement either @brentleyjones's proposal or something similar, we can change the flag semantics again to match whatever we decide to implement. |
Copying parts of my comment from #6519: Steps for cleaning up
|
@katre Would step 1 include making it single-valued within transition implementation functions as well? I could see that being very breaking. Could we keep |
Yes, that's part of why we're not moving on this faster. Having two different flags also seems confusing. When we pick this up we'll consider which is less bad. I consider multi-valued |
Description of the feature request:
Right now, the
--platforms
flag accepts multiple values but only the first is actually used.Instead, the flag should be single-valued and give an error if multiple values are passed.
Further, the flag should actually be
--platform
and uses should be migrated, but that may be harder to manage.Which category does this issue belong to?
Configurability
What underlying problem are you trying to solve with this feature?
Poor decision decisions at the start of the platforms project
Which operating system are you running Bazel on?
No response
What is the output of
bazel info release
?No response
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: