Skip to content

Releases: google/built_value.dart

Fix to generated code

06 Feb 08:06
fac4477
Compare
Choose a tag to compare

Fix generated serialization code when a manually declared builder causes a field to not use a nested builder.

Workaround for analyzer issue

01 Feb 10:33
9a8c96e
Compare
Choose a tag to compare

Workaround for analyzer issue when implementing multiple classes that
use @BuiltValue(instantiable: false).

Relax restriction on `extends`

29 Jan 15:23
9eac9de
Compare
Choose a tag to compare
  • Relax restriction on extends to allow for one special case: sharing of
    code between built_value and const classes. The base class in question
    must be abstract, have no fields, have no abstract getters and must not
    implement operator==, hashCode or toString.

Allow quiver 0.28

29 Jan 12:03
6c7f18e
Compare
Choose a tag to compare
Merge pull request #334 from davidmorgan/bump-quiver

Allow quiver 0.28; release 5.0.1.

Restrict using built_value in unsupported ways

25 Jan 10:03
d1be9bd
Compare
Choose a tag to compare

This release makes built_value actively block use in three unsupported ways. If you do need any of these to work, please file an issue and we'll look into it.

  • Use of extends is prohibited; use implements or extends Object with instead.
  • Importing package:built_value/built_value.dart with show or as is prohibited; this hides symbols from the generated code.
  • Use of SDK collections in fields is prohibited; they are mutable and break the built_value guarantees.

Any problems please file an issue here: https://github.com/google/built_value.dart/issues

Allow hand-coded base builders

16 Jan 12:15
838c5b6
Compare
Choose a tag to compare

For classes using @BuiltValue(instantiate: false, you can now hand-code the builder. This allows you to customize the base builder.

Better error messages; fix for serialization with StandardJsonPlugin

09 Jan 13:47
3b73ac7
Compare
Choose a tag to compare
  • Add custom Error classes: BuiltValueNullFieldError, BuiltValueMissingGenericsError and BuiltValueNestedFieldError. These provide clearer error messages on failure. In particular, errors in nested builders now report the enclosing class and field name, making them much more useful.
  • Fix serialization when using polymorphism with StandardJsonPlugin.

Bump quiver and built_collection versions

08 Jan 09:13
8878ecf
Compare
Choose a tag to compare

Allow quiver 27 and built_collection 3.

Fix for generation when using summaries

20 Dec 16:20
d98ca76
Compare
Choose a tag to compare

This will not affect anyone using the standard (pub) build.

Many features, improvements and fixes

20 Dec 10:36
584a775
Compare
Choose a tag to compare

New features:

  • Add serialize field to @BuiltValueField. Use this to tag fields to skip
    when serializing.
  • Add wireName field to @BuiltValue and @BuiltValueField. Use this to
    override the wire name for classes and fields when serializing.
  • Add @BuiltValueEnum and @BuiltValueEnumConst annotations for specifying
    settings for enums. Add wireName field to these to override the wire names
    in enums when serializing.
  • Add support for polymorphism to StandardJsonPlugin. It will now specify
    type names as needed via a discriminator field, which by defualt is
    called $. This can be changed in the StandardJsonPlugin constructor.
  • Add BuiltListAsyncDeserializer. It provides a way to deserialize large
    responses without blocking, provided the top level serialized type is
    BuiltList.
  • Add built in serializer for Uri.

Improvements:

  • Allow declaration of multiple Serializers in the same file.
  • Explicitly disallow private fields; fail with an error during generation if
    one is found.
  • Improve error message for field without type.

Fixes:

  • Fix generated builder when fields hold function types.
  • Fix checks and generated builder when manually maintained builder has
    generics.
  • Fix name of classes generated from a private class.
  • Fix builder and serializer generation when importing with a prefix.