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

[FR]: fail the build when a write_source_files target is out-of-date #993

Open
alexeagle opened this issue Dec 6, 2024 · 0 comments
Open

Comments

@alexeagle
Copy link
Collaborator

Currently write_source_files relies on a test target to inform developers that a file in bazel-out no longer matches the copy in the source tree, and prompting them with a bazel run command to perform the copy operation.

This isn't great because developers may be working with an outdated file in their editor, for example a newly added proto field isn't appearing for auto-completion. Only when they know to run tests (or when CI runs tests for them) do they learn of it.

However I believe that https://bazel.build/extending/rules#validation_actions allow us to catch this during bazel build instead. This makes it more likely developers find out - for example if they just bazel run //my:devserver they can get a build-time error that the schema is outdated.

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

No branches or pull requests

1 participant