question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 7 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
damienmgcommented, Mar 14, 2017

@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.

1reaction
damienmgcommented, Mar 10, 2017

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 😃.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found