Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bazel support (with tests), add ability to cache downloads locally for increased iteration speed. #19

Merged
merged 4 commits into from
Oct 22, 2024

Conversation

pjreiniger
Copy link
Contributor

@pjreiniger pjreiniger commented Oct 19, 2024

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.

@pjreiniger
Copy link
Contributor Author

Also, with BuildBuddy even if the tests are cached you can see the console output of the t est

@jasondaming jasondaming merged commit 106ac22 into wpilibsuite:main Oct 22, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants