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

Add allow_empty to glob, as the patterns don't necessarily match something #245

Merged
merged 3 commits into from
Aug 6, 2019

Conversation

laurentlb
Copy link
Contributor

This is needed for the change in Bazel --incompatible_disallow_empty_glob

…thing

This is needed for the change in Bazel --incompatible_disallow_empty_glob
This provides additional Bazel compatibility fixes (--incompatible_restrict_string_escapes)
"lib/rustlib/{target_triple}/lib/*{dylib_ext}",
"lib/rustlib/{target_triple}/lib/*{staticlib_ext}",
],
allow_empty = True,
Copy link
Collaborator

Choose a reason for hiding this comment

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

In which case does that glob is empty? Can a comment be added to justify it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's the error message I got:
glob pattern 'lib/rustlib/x86_64-unknown-linux-gnu/lib/*.a' didn't match anything, but allow_empty is set to False.

I don't know if it happens in other cases too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That seems to indicate a potential bug, this is expected that there is no .a file here. I guess the empty glob is acting if any of those is empty.

Can you just add a comment with the pattern that fails to justify this allow_empty? It's not important to fix at the moment but keeping track of why we did that is useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added comment

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks!

"lib/rustlib/{target_triple}/lib/*{dylib_ext}",
"lib/rustlib/{target_triple}/lib/*{staticlib_ext}",
],
allow_empty = True,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@damienmg damienmg merged commit 7caeda2 into bazelbuild:master Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants