Skip to content

Introduce repeatable_string_flag.#593

Merged
tetromino merged 13 commits intobazelbuild:mainfrom
susinmotion:patch-1
Sep 23, 2025
Merged

Introduce repeatable_string_flag.#593
tetromino merged 13 commits intobazelbuild:mainfrom
susinmotion:patch-1

Conversation

@susinmotion
Copy link
Copy Markdown
Contributor

New settings of this flag type do not override each other; they are concatenated into a list. --foo=bar --foo=baz -> [bar, baz]. This is the equivalent of a string typed native flag with allow_multiple.

New settings of this flag type do not override each other; they are concatenated into a list. --foo=bar --foo=baz -> [bar, baz]. This is the equivalent of a string typed native flag with allow_multiple.
Copy link
Copy Markdown
Collaborator

@tetromino tetromino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall lgtm

Nit: is it worth adding a test for this? (See tests/common_settings/BUILD)

Comment thread rules/common_settings.bzl Outdated
Comment thread rules/common_settings.bzl Outdated
Comment thread rules/common_settings.bzl Outdated
Comment thread rules/common_settings.bzl Outdated
@susinmotion
Copy link
Copy Markdown
Contributor Author

Overall lgtm

Nit: is it worth adding a test for this? (See tests/common_settings/BUILD)

For posterity, I did not add a test because this flag type doesn't become a variable, so it's not a possible to make the comparable test. I tried using a custom starlark rule that had the an attr of this flag type, but it's overkill.

@susinmotion susinmotion reopened this Sep 22, 2025
@tetromino tetromino merged commit bf6c041 into bazelbuild:main Sep 23, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants