Skip to content

Support build 5 with Freezed and build_runner 2.17.1 #1378

Closed

Description

@pomazanbohdan

Describe the bug

freezed 4.0.2 and build_runner 2.17.1 cannot resolve together: Freezed requires build >=3.0.0 <5.0.0, while the runner requires build >=5.0.0 <5.1.0.

Tested independently with Dart 3.13.5 on Windows. The minimal case intentionally includes only Freezed and the runner, isolating this constraint from other generators. Resolution stops before code generation; this is not proof of a Freezed source/API incompatibility.

To reproduce

Create this pubspec.yaml in an empty directory, then run dart pub get:

name: build5_freezed_repro
publish_to: none
environment:
  sdk: ^3.13.5
dev_dependencies:
  build_runner: ^2.17.1
  freezed: 4.0.2

Actual result (exit code 1):

Because freezed >=3.2.3 depends on build >=3.0.0 <5.0.0 and build_runner >=2.17.1 depends on build >=5.0.0 <5.1.0, freezed >=3.2.3 is incompatible with build_runner >=2.17.1.
So, because build5_freezed_repro depends on both build_runner ^2.17.1 and freezed 4.0.2, version solving failed.

Expected behavior

Please validate Freezed with build 5 and publish a supported dependency range that permits the current stable build_runner, if compatible.

The build_runner changelog explains its build 5 requirement. The current Freezed manifest excludes that version. The earlier build 3/4 request #1299 is closed and concerns the preceding transition.

No dependency overrides were used.

Activity

  1. linked a pull request that will close this issueSupport latest build #1380on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions