Skip to content

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

@davidmorgan

Description

@davidmorgan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions