-
Notifications
You must be signed in to change notification settings - Fork 482
Add allow_empty to glob, as the patterns don't necessarily match something #245
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
Conversation
…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, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comment
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This is needed for the change in Bazel --incompatible_disallow_empty_glob