Skip to content

refactor: remove freezed, json_serializable, and build_runner in favor of handwritten code - #264

Closed
mosuem wants to merge 4 commits into
bmw-tech:mainfrom
mosuem:remove-freezed
Closed

mosuem wants to merge 4 commits into
bmw-tech:mainfrom
mosuem:remove-freezed

Conversation

@mosuem

@mosuem mosuem commented Aug 6, 2026

Copy link
Copy Markdown
Contributor
  • Replace @freezed annotations with plain Dart classes (with const constructors, copyWith, value equality == / hashCode, and toString()) across all AST / model declarations.
  • Replace @JsonSerializable() code generation with handwritten toJson() and fromJson() serialization on Storage V3 classes.
  • Remove all 17 .freezed.dart and 7 .g.dart generated files (-11,700+ lines of generated code).
  • Remove freezed_annotation, json_annotation, freezed, json_serializable, and build_runner dependencies from pubspec.yaml, adding meta for @visibleForTesting.
  • Remove build.yaml and clean up analysis_options.yaml.
  • Eliminates all code generation build steps and external 3P runtime dependencies, preparing dart_apitool for direct integration into the Dart SDK.

mosuem added 4 commits August 5, 2026 09:09
…ndencies

- Remove unused pubspec_manager dependency from root pubspec.yaml
- Replace package:stack Stack<Declaration> with standard Dart List<Declaration>
- Replace package:tuple Tuple2 with Dart 3 Records
- Replace package:plist_parser with regular expression matching for MinimumOSVersion in plist files
…sh dependencies

- Remove package:colorize in favor of standard ANSI escape sequences in ColorUtils
- Remove package:console in favor of standard ANSI terminal cursor control and a custom ASCII tree formatter
- Remove package:lumberdash and package:colorize_lumberdash in favor of standard stderr.writeln warnings and errors
@sigurdm

sigurdm commented Aug 6, 2026

Copy link
Copy Markdown

I think that as long as the built artifacts are checked in to version control, it is not a problem for third-party dependencies of the sdk to have dev-dependencies that are not in sdk DEPS.

@mosuem

mosuem commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Ah nice, that would simplify things.

@mosuem

mosuem commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Seems to work! Closing this for now.

@mosuem mosuem closed this Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants