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

[Tooling] build_runner watch shouldn't break when the builder code changes to an invalid code #3840

Open
davidmorgan opened this issue Feb 10, 2025 · 0 comments
Labels
type-enhancement A request for a change that isn't a bug

Comments

@davidmorgan
Copy link
Contributor

Discussed in #3839

Originally posted by mateusfccp February 10, 2025
If you run build_runner watch in a project that is consuming a stable build package, like json_serializable or freezed, if you change your code to something invalid, the process won't break. Instead, it will print the errors it found and will wait for the next code version to try to generate it again.

(Sometimes it breaks, but I consider it a bug and it should be addressed elsewhere. The normal expected behavior is for it to not break)

This is not true if you are changing the builder itself. Whenever you are building [sic] a builder, if you change your builder to invalid code (like code with static errors), the tool will print in the stdout that the code has errors and crash.

This hinders the development process, as one has to keep rerunning build_runner (either build or watch) whenever they make any change.

Making build_runner fault tolerant to changes in the builder itself would streamline the development process.

@davidmorgan davidmorgan added the type-enhancement A request for a change that isn't a bug label Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

1 participant