Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove event mixin stuff #738

Closed
osa1 opened this issue Aug 23, 2022 · 0 comments · Fixed by #880
Closed

Remove event mixin stuff #738

osa1 opened this issue Aug 23, 2022 · 0 comments · Fixed by #880

Comments

@osa1
Copy link
Member

osa1 commented Aug 23, 2022

PbEventMixin, PbFieldChange, and EventBuffer are currently unused. No need to maintain unused code, we should just remove them.

They're just a few lines of code and implemented as a separate library (instead of as a part of the protobuf library), so users can implement that stuff themselves if needed.

osa1 added a commit to osa1/protobuf.dart that referenced this issue Oct 10, 2023
This removes `PbEventMixin`, `PbFieldChange`, and `EventBuffer` types,
and the event plugin mixin support from the plugin.

This mixin is currently not used internally and we don't want to
introduce uses to it to keep the API surface small, to make it easier to
make changes or migrate to another protobuf library.

Fixes google#738.

cl/571893384
@osa1 osa1 closed this as completed in #880 Oct 12, 2023
osa1 added a commit that referenced this issue Oct 12, 2023
Event support is currently unused internally and we don't want to introduce new
uses of it, to keep the API surface small and the library easier to update, and
to make it easier to migrate to another library.

`createRepeatedField` and `createMapField` existed to support events (as
`PbList` and `PbMap` don't support this), so with the event mixin removed we
remove these members as well.

Removing these members give us other opportunities: we now have full control
over the field value types. This allows, for example, refactoring `PbMap` and
`PbList` types for marking them as frozen without visiting the elements, which
makes it possible to implement decoders that create frozen objects without
having to make another pass after decoding to mark every object as frozen.

Closes #738.

cl/571893384
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant