Skip to content

Commit

Permalink
Fix json serializable annotation for ignored field (#3631)
Browse files Browse the repository at this point in the history
The annotation was last changed in
#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.
  • Loading branch information
natebosch committed Jan 11, 2024
1 parent 8e1cbf8 commit 37e45e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build_config/lib/src/build_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class BuildConfig {
}
}

@JsonKey(includeFromJson: true, includeToJson: true)
@JsonKey(includeFromJson: false, includeToJson: false)
final String packageName;

/// All the `builders` defined in a `build.yaml` file.
Expand Down

0 comments on commit 37e45e3

Please sign in to comment.