Glob patterns does not accept parentheses
See original GitHub issue[dmarting@trantor] /tmp/test$ cat BUILD
filegroup(name = "test", srcs = glob(["**"], exclude = ["**/*(*"]))
[dmarting@trantor] /tmp/test$ cat WORKSPACE
[dmarting@trantor] /tmp/test$ bazel build :test
ERROR: /tmp/test/BUILD:1:33: Traceback (most recent call last):
File "/tmp/test/BUILD", line 1
filegroup(name = "test", srcs = glob(["**"],..."]))
File "/tmp/test/BUILD", line 1, in filegroup
glob(["**"], exclude = ["**/*(*"])
illegal character '('
ERROR: no such target '//:test': target 'test' not declared in package '' defined by /tmp/test/BUILD
INFO: Elapsed time: 0.176s
FAILED: Build did NOT complete successfully
[dmarting@trantor] /tmp/test$ ls -R
.:
BUILD WORKSPACE
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
No match found when pattern contains parentheses · Issue #74
If the specified pattern contains parentheses, no match is ever found, even when the path exists. const globby = require('globby'); (async () => ......
Read more >Glob is not working when directory name with special ...
Above code is working but when directory name with square brackets like dir[name] or dir - [name] then its not working.
Read more >Using brackets in glob patterns - bash - Ask Ubuntu
I am having difficulty deciding where to put the square bracketing in the following bash glob expression that is supposed to match a...
Read more >How do I use a glob with parentheses in Zsh? - Ask Different
1 Answer 1 · Parentheses are not basic glob syntax, they're a zsh-only extension. · OK, I didn't know that. · @GordonDavisson I...
Read more >Glob (programming) - Wikipedia
Extended globbing (extglob): allows other pattern matching operators to be used to match multiple occurrences of a pattern enclosed in parentheses, essentially ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@harmank the log is just telling me which test has failed. It output the test log file that you can look at to the see the actual test failure.
So this behavior dates back from the beginning of Blaze, there is no explanation whatsoever why those characters are not allowed in globs. I guess they wanted to reserve them to expand the glob pattern syntax. I would try to remove that restriction and run the test suite and see what it says 😃.