Add bazel support (with tests), add ability to cache downloads locally for increased iteration speed. #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So I only really have a cursory understanding of what this repository is for, I might have missed it when I was too busy to come to meetings. But I saw the "only re-run on whats changed" comments and the "well, if no json changed that probably means you should run everything" comments and my mind immediately went to bazel. This PR wraps the
check.py
tool in a unit test, and unit test is auto-magically created for each vendor dep. Rather than just inspecting the output to see that there are errors, rules can be enforced to ensure the json files are at the very least error-free.Due to bazels excellent caching system, the unit tests will only be run if an input is changed; at the moment that means the json file itself OR the check.py library. If the check.py library is dirty, every unit test will automatically be rerun. No need to do git diff to figure out what to do, just run
bazel test //...
This additionally adds the ability to cache downloads locally. If someone is making updates purely on the json validation part, it is super annoying to have to redownload the files if they haven't changed. This should NOT bus used in CI.