refactor(freezed): declare freezed classes abstract - #14
Merged
Conversation
Converts all 41 `@freezed` classes in bccm_core from `class X with _$X` to `abstract class X with _$X`. freezed 3.0.0 made this mandatory — classes must be `abstract`, `sealed`, or manually implement `_$X` — and freezed 4 is required by the codegen cluster (it is the only freezed supporting analyzer 13, which is in turn the only analyzer that parses Dart 3.13). Landing the syntax change on its own keeps it out of that cutover PR. No regeneration needed: the generated mixin does not depend on the declaration keyword, so the committed .freezed.dart files stay valid. This was verified on freezed 2.5.8 in a clean pure-Dart harness, which matters because codegen currently cannot run on Flutter 3.47 at all. None of the 41 are unions (each has one public factory, plus fromJson where serialized), so `abstract` is correct throughout and no class needs `sealed`. No @unfreezed anywhere, so the freezed 4 removal of `final` in constructor parameters does not apply. Verified: bccm_core analyze clean + 68/68 tests; brunstadtv_app 132 issues (unchanged baseline, 0 errors) + 113/113 tests; kids 10 issues, 0 errors. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Converts all 41
@freezedclasses in bccm_core fromclass X with _$Xtoabstract class X with _$X.freezed 3.0.0 made this mandatory — classes must be
abstract,sealed, or manually implement_$X— and freezed 4 is required by the codegen cluster (it is the only freezed supporting analyzer 13, which is in turn the only analyzer that parses Dart 3.13). Landing the syntax change on its own keeps it out of that cutover PR.No regeneration needed: the generated mixin does not depend on the declaration keyword, so the committed .freezed.dart files stay valid. This was verified on freezed 2.5.8 in a clean pure-Dart harness, which matters because codegen currently cannot run on Flutter 3.47 at all.
None of the 41 are unions (each has one public factory, plus fromJson where serialized), so
abstractis correct throughout and no class needssealed. No @unfreezed anywhere, so the freezed 4 removal offinalin constructor parameters does not apply.Verified: bccm_core analyze clean + 68/68 tests; brunstadtv_app 132 issues (unchanged baseline, 0 errors) + 113/113 tests; kids 10 issues, 0 errors.