$(query_targets) parsing error
See original GitHub issueI have a genrule that looks like this:
genrule (
name = 'dist-server',
bash = """echo $(query_targets "kind('prebuilt_jar', deps(attrfilter(labels, 'server', '//...')))") >$OUT """,
out = 'dist-server.txt',
)
This rule generates the following error from Buck:
BUILD FAILED: Error parsing target expression //... for target //:dist-server
However, this interactive command from the shell works:
bash$ buck query "kind('prebuilt_jar', deps(attrfilter(labels, 'server', '//...')))"
//ThirdParty/deps:lucene-memory
//ThirdParty/deps:lucene-queries
//ThirdParty/deps:lucene-sandbox
...
//ThirdParty/deps:gson
The documentation states:
The query_* macros accepts a quoted query expression which supports the following query functions:
- attrfilter
- deps
- except
- classpath
- intersect
- filter
- kind
- set
- union
Of which the above expression appears to conform.
Ultimately, our goal is to generate a rule that depends (dynamically) on labeled java_library targets, and queries their respective outputs via $(query_outputs ...)
for the purposes of copying them into a distribution folder.
Am I missing something?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Query parsing errors - IBM
This error is commonly caused by incorrect percent-encoding of characters in the query. For details of how to percent-encode characters, see Retrieving ...
Read more >Parse Cloud Code Queries Return Nothing - Stack Overflow
This is the current code I've put together: var queryGoals = new Parse.Query(Parse.Object.extend ...
Read more >Parse Error: What It Is and How to Fix It - Lifewire
A parse error is an error message you sometimes get on Android devices when an app fails to install. The message itself is...
Read more >[SERVER-10891] Commands don't return "ok" field if targeting ...
The command subsystem is only invoked when a query targets the collection "$cmd". ... cmd" as the namespace (which fails namespace parsing, ...
Read more >#1293 (Induced condenser doesn't work with where clause ...
rasdaman error 300: Parsing error 300 in line 3, column 4: Unexpected name ... error 361 in line 1, column 1, near token...
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 FreeTop 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
Top GitHub Comments
@asp2insp Thanks. We sliced the cake in a different way to solve our use case.
@brettwooldridge, can you share your code snippet?