genrule's deps are missing
See original GitHub issueSo, according to the existing docs, every buildrule has a set of deps
.
But why genrule
’s deps have had considered useless and had been removed in the first place ?
I’d personally love using back as an asset processor via genrule
with deps
so I could chain optipng
commands, or even use it to rebuild and refresh docker images. There are multiple generic use cases for the genrule
stanza.
I simply don’t get it. As for me, it’s an inconsistency.
Maybe there’s some other way ?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Bazel dependency on genrule from cc_library doesn't build
I am porting some Makefiles for a very complex embedded system to Bazel, and I'm running into some problems with some weird dependencies...
Read more >genrule/genrule_test.go - platform/build/soong - Git at Google
package genrule. import ( ... name: "srcs allow missing dependencies", ... inputs, but only if $(in) is not referenced in the genrule cmd....
Read more >Easier Debugging of Sandbox Failures - Bazel Blog
You can now debug the failure, e.g. you can explore the sandbox: look for any missing file, check for possible errors in your...
Read more >What's better than a genrule? - Aspect Blog
Sadly, the "canonical" genrule bazel.build/reference/be/general#genrule is pretty lacking, and requires that you give it a bash one-liner or ...
Read more >Assembly and generate script - Google Groups
ERROR: /Users/paulo/Developer/workspaces/cpp/djinni/generator/BUILD:1:8: Executing genrule //generator:generator failed: missing input file ...
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
Note that due to Buck’s caching model, thinking of when targets are being run or executed and how to control that using dependencies doesn’t map intuitively to how it actually works. It’s simpler if you think of inputs and outputs.
This is one of the reasons we removed
deps
fromgenrule
: some users were used to the task based mental model that other build systems use, for example ant, and were using genrules with deps to replicate that but then hitting all sorts of issues with the caching.The location macros make it much more explicit that you’re passing the output of certain rules as inputs, so it’s less surprising when the output is retrieved from cache and the genrule is never executed.
@yuriy-yarosh you mean like: