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

[bazel.build] Problem with /reference/be/functions: effect of glob(allow_empty = False) #20377

Open
lingithub1 opened this issue Nov 30, 2023 · 0 comments
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Configurability platforms, toolchains, cquery, select(), config transitions team-Documentation Documentation improvements that cannot be directly linked to other team labels type: documentation (cleanup)

Comments

@lingithub1
Copy link

Page link:

https://bazel.build/reference/be/functions

Problem description (include actual vs expected text, if applicable):

A part of the effect of allow_empty is missing in the description:

Where do you see this issue? (include link to specific section of the page, if applicable)

https://bazel.build/reference/be/functions#glob_example states:

If the allow_empty argument is set to False, the glob function will error-out if the result would otherwise be the empty list.

#8195 states:

We've just added a new argument to glob: allow_empty. For example, let's say your code looks like:

glob([pattern_a, pattern_b], exclude = [pattern_c], allow_empty = False)

This code will fail if pattern_a or pattern_b doesn't match anything. It also fails if the whole function (after excluding pattern_c) doesn't match anything.

Therefor, the documentation is missing that allow_empty = True will error out not only if the result is empty but also if any of the patterns does not match a single file (or directory, depending on exclude_directories).

Any other information you'd like to share?

No response

@lingithub1 lingithub1 added team-Documentation Documentation improvements that cannot be directly linked to other team labels type: documentation (cleanup) untriaged labels Nov 30, 2023
@gregestren gregestren added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed untriaged labels Jan 4, 2024
@sgowroji sgowroji added the team-Configurability platforms, toolchains, cquery, select(), config transitions label Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Configurability platforms, toolchains, cquery, select(), config transitions team-Documentation Documentation improvements that cannot be directly linked to other team labels type: documentation (cleanup)
Projects
None yet
Development

No branches or pull requests

5 participants