rules_jsonnet
rules_jsonnet copied to clipboard
Strict mode for multiple_outputs
It would be helpful for the jsonnet_to_json rule to have an argument triggering verification that the outs
enumerated in the rule matches all the output files generated from the inputs.
I was recently bit by a case where I added several output files but forgot to update my BUILD rule.
good idea
Just hit this as well. It is massively confusing to see:
INFO: From Compiling Jsonnet to JSON for config:
bazel-out/k8-fastbuild/bin/bare/bb-browser.json
bazel-out/k8-fastbuild/bin/bare/bb-event-service.json
bazel-out/k8-fastbuild/bin/bare/bb-runner.json
bazel-out/k8-fastbuild/bin/bare/bb-scheduler.json
bazel-out/k8-fastbuild/bin/bare/bb-storage.json
bazel-out/k8-fastbuild/bin/bare/bb-worker.json
but actually some files not being there without any error.
stdout from jsonnet is the list of file names, which should make this pretty easy.