send events for extension field changes

Pass FieldInfo to the eventPlugin since it may be useful,
for example to determine if the field is an extension.

Also did some internal refactoring to pass FieldInfo instead
of a tag number in more places.

API change: make clearExtension actually clear repeated fields,
rather than setting them to a mutable empty list. This is to
avoid inconsistent behavior when using getFieldOrNull,
getDefaultForField, and event delivery.

Proposed API change: clearField() should require a valid tag
number. (Needed to pass the FieldInfo to the eventPlugin.)
This is currently only enforced when an eventPlugin is used.

BUG=
R=sgjesse@google.com

Review URL: https://chromiumcodereview.appspot.com//1291283004.
6 files changed
tree: 3171a3b01466227c0d1065fec69aad5920b6b54f
  1. lib/
  2. test/
  3. .gitignore
  4. .status
  5. .test_config
  6. AUTHORS
  7. CHANGELOG.md
  8. codereview.settings
  9. CONTRIBUTING.md
  10. LICENSE
  11. PATENTS
  12. pubspec.yaml
  13. README.md
README.md

Provides runtime support for a Dart implementation of protobufs.

Typically one do not need to import this library–only libraries generated by the protoc plugin import this library directly.

If your library or application uses generated protobuf libraries, add this library as a dependency.

References