dart-lang / build

A build system for Dart written in Dart
https://pub.dev/packages/build
BSD 3-Clause "New" or "Revised" License
791 stars 211 forks source link

Fix json serializable annotation for ignored field #3631

Closed natebosch closed 10 months ago

natebosch commented 11 months ago

The annotation was last changed in https://github.com/dart-lang/build/pull/3445

The intention of the change was to retain behavior of passing the deprecated option ignore: true. The replacement is to use two fields includeToJson and includeFromJson which allow more fine-grained configuration, but also invert the condition. The boolean must be false to retain old behavior.

Before this change rerunning code generation would result in a change to build_config.g.gdart. After this change the build is a no-op.