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

Support repeated flags in platform mappings and platform-based flags #22453

Open
katre opened this issue May 20, 2024 · 0 comments
Open

Support repeated flags in platform mappings and platform-based flags #22453

katre opened this issue May 20, 2024 · 0 comments
Labels
P2 We'll consider working on this in future. (Assignee optional) team-Configurability Issues for Configurability team type: feature request

Comments

@katre
Copy link
Member

katre commented May 20, 2024

This was discovered while implementing platform-based flags, #19409. Since this uses the same BuildOptions.applyParsingResult method as platform mappings, the same issue applies to both.

A quick definition: a repeatable flag is a flag where repeated uses accumulate, instead of overwriting. This corresponds to using @Option.allowMultiple in a native flag or defining a Starlark flag using config.string_list(repeatable = True). Commonly used flags that use this are --features and --copt.

Currently, any repeatable flags used in platform mapping or platform based flags will overwrite any previous values. If any platforms set the --features flag, for example, this will remove any values set on the command line.

Ideally we would either intelligently merge these, or at least warn users that it happens.

There are example tests that show the error: #22386 (see errors: https://buildkite.com/bazel/bazel-bazel-github-presubmit/builds/21626).

This is a tracking issue for dealing with this.

@katre katre added type: feature request P2 We'll consider working on this in future. (Assignee optional) team-Configurability Issues for Configurability team labels May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) team-Configurability Issues for Configurability team type: feature request
Projects
None yet
Development

No branches or pull requests

1 participant