Skip to content

protoc_plugin-21.0.0

Compare
Choose a tag to compare
@osa1 osa1 released this 15 Jun 08:38
· 46 commits to master since this release
a9bf79f
  • Identifiers fromBuffer, fromJson, $_defaultFor, initByValue are no longer reserved. Proto fields with those Dart names will no longer have a suffix added. (#679)

  • Remove message constructor arguments. Constructors with arguments cause increase in release binary sizes even when no arguments are passed to the constructors. (#703)

    Migration:

    Set the fields after construction, using cascade syntax. For example, if you have:

    MyMessage(a: 123, b: [1, 2, 3])

    You can do:

    MyMessage()
      ..a = 123
      ..b.addAll([1, 2, 3])
  • Require Dart 2.19.

  • Export public dependencies (import publics in proto files) in .pbenum.dart files, same as .pb.dart files. (9aad6aa)

  • Fix decoding map fields when key or value (or both) fields of a map entry is missing. (#719, #745)

  • Generated files now split ignore_for_file comments across multiple lines when necessary. (#770)

  • Generated files now uses shared consts to eliminate repeated bool.fromEnvironment() expressions. (#772)

  • Removed accidental /// at the top of generated Dart files to avoid new dangling_library_doc_comments lint. (#774)

  • Generated files now have sorted imports and have fewer import-related ignore_for_file: analysis directives. (#778)

  • Remove duplicated consts in generated files. (#773)