From 9d000474296db81908c0699e51f414ba2dcaeacf Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Wed, 27 Dec 2023 00:23:12 +0000 Subject: [PATCH] Fix json serializable annotation for ignored field 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. --- build_config/lib/src/build_config.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_config/lib/src/build_config.dart b/build_config/lib/src/build_config.dart index d32bb27b6..5bc943d1a 100644 --- a/build_config/lib/src/build_config.dart +++ b/build_config/lib/src/build_config.dart @@ -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.