-
Notifications
You must be signed in to change notification settings - Fork 183
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
Simplify PbList implementation, fix freezing #626
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
LGTM
I refactored the implementation a little bit and I think this version looks good. Only problem is removing We could fix the two bugs (freezing the list allows updates in aliased lists, freezing the list does not freeze elements) without removing any classes, but it would require copying the mutable list (deep or shallow depending on the intended semantics) when creating a I say we keep this PR for the next major release (maybe we can create a branch for it). Fixing the bug without changing the API requires more work in runtime. |
A field value is one of these: - PbListBase (for `repeated`, PbList after google#626) - PbMap - int - double - bool - String - List<int> (for `bytes`) - GeneratedMessage `ByteData` is not a valid field value type, so remove the `ByteData` cases when checking field value types.
A field value is one of these: - PbListBase (for `repeated`, PbList after #626) - PbMap - int - double - bool - String - List<int> (for `bytes`) - GeneratedMessage `ByteData` is not a valid field value type, so remove the `ByteData` cases when checking field value types.
GitHub's "request review" button doesn't seem work for non-collaborators.. @rakudrama PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PbList
is now a single classFreezing no longer creates a new list, sets
_isReadOnly
flag of the currentlist
Freezing
PbList
now freezes elementsPbList
implementation is now consistent withPbMap
.Fixes #624.
cl/450278877