-
Notifications
You must be signed in to change notification settings - Fork 199
Comparing changes
Open a pull request
base repository: google/protobuf.dart
base: protoc_plugin-v23.0.0
head repository: google/protobuf.dart
compare: protoc_plugin-v24.0.0
- 10 commits
- 50 files changed
- 1 contributor
Commits on Sep 30, 2025
-
- cl/660721933: moves some proto3 parsing functions to utils to allow reusing internally in a library when parsing an internal format. - cl/646759129: Update `CodedBufferReader` default depth limit to 100, to be consistent with the C++ and Java implementations. - cl/704280814: Update `CodedBufferReader` default size limit to max 32-bit signed integer to be consistent with the C++, Java, Objective-C implementations. - Also a minor change, not a CL: Type casts in `coded_buffer_writer.dart` was updated in this repo probably accidentally, as we never want to type cast with `as` in this repo. Revert it to the internal version which uses implicit casts. With this, about half of the protobuf files become identical with the internal version.
Configuration menu - View commit details
-
Copy full SHA for 14bbd0b - Browse repository at this point
Copy the full SHA 14bbd0bView commit details
Commits on Oct 20, 2025
-
Fix a few extension field bugs (#1062)
When an extension field set isn't initialized before freezing the message: - `addExtension` allows adding and modifying extensions. - `getExtension` returns non-frozen defaults that can be modified. Fix this by initializing the extension field set as frozen when the parent message is frozen. Secondly, extension field set returns differently typed lists when it's frozen and not frozen. Fix this by always creating the list via the field's `FieldInfo`. Also refactor the code a little bit: `GeneratedMessage` by-passes a layer of abstraction and accesses unknown field sets directly. Instead make it call `FieldSet` always. New `FieldSet` methods are added as public (without an underscore in the name) to make it clear that they're a public interface (can be called from `GeneratedMessage`). (Ideally `FieldSet` should be a separate library, but that requires a lot of refactoring to split the parts into libraries.) Also remove duplicate "is repeated" and "ensure writable" checks when modifying extension fields. --- cl/819146715
Configuration menu - View commit details
-
Copy full SHA for 78cf743 - Browse repository at this point
Copy the full SHA 78cf743View commit details
Commits on Oct 21, 2025
-
Move PbList to its own library (#1063)
A while ago we started converting parts to libraries to allow conditional compilation. This continues to move more parts to libraries, with `PbList`. Libraries allow specifying public and internally public interfaces of the types and makes it easier to define and maintain internal invariants. To avoid large (difficult to sync) diffs, I'm moving one part at a time. apitool reports no changes with this PR.
Configuration menu - View commit details
-
Copy full SHA for 5a44489 - Browse repository at this point
Copy the full SHA 5a44489View commit details -
More clearExtension tests: (#1064)
Mutation testing discovered that removing the `_ensureWritable` line in `FieldSet.clearExtension` doesn't cause any test failures. Add a test that fails when the line is removed.
Configuration menu - View commit details
-
Copy full SHA for 9b4c46f - Browse repository at this point
Copy the full SHA 9b4c46fView commit details -
Move PbMap to its own library (#1066)
Continuation to #1063. apitool reports no changes with this PR. Map decoding code moved from `pb_map.dart` to `coded_buffer.dart` to avoid accessing `CodedBufferReader` internals in `PbMap`. It's also more consistent to have all decoding code in `coded_buffer.dart`. We don't have repeated field decoding code in `pb_list.dart`, and `pb_list.dart` and `pb_map.dart` don't have decoders for other formats. Static members `_keyFieldNumber` and `_valueFieldNumber` are removed as they were duplicates of top-level members `mapKeyFieldNumber` and `mapValueFieldNumber`. `deepCopy` is exported as an internal extension to avoid expanding the public API without consideration.
Configuration menu - View commit details
-
Copy full SHA for 27730db - Browse repository at this point
Copy the full SHA 27730dbView commit details
Commits on Oct 23, 2025
-
More field validation tests (#1068)
For {extension,non-extension} {singular,repeated} fields, check range and type checks. All fields with range checks are tested. For type and nullability checks we only use a message and a `bool` field, as there are too many types of fields and most of them use the same validation function. Fields with range checks are not tested for type and nullability checks. To check whether a value is within range we have to use as a non-null `int` or `double`, so if the value being checked doesn't have the right type the range check function will throw anyway. This reveals two inconsistencies in the library: - When type of a non-repeated extension value is not right we throw an argument error instead of a type error. - `setExtension` takes an `Object` (not nullable) as an argument but `addExtension` takes `Object?` (nullable). I tested accordingly instead of trying to fix the inconsistencies as fixing them will break downstream.Configuration menu - View commit details
-
Copy full SHA for a77f9a6 - Browse repository at this point
Copy the full SHA a77f9a6View commit details
Commits on Oct 24, 2025
-
Avoid redundant nullability checks when updating repeated fields (#1069)
Since sound null safety we no longer need to manually check for nulls when setting fields, as we don't use nullable types for field values. Fixes #978.
Configuration menu - View commit details
-
Copy full SHA for 7db0784 - Browse repository at this point
Copy the full SHA 7db0784View commit details
Commits on Oct 28, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 4b488e0 - Browse repository at this point
Copy the full SHA 4b488e0View commit details
Commits on Oct 30, 2025
-
Don't generate
createRepeatedmembers (#1074)`createRepeated` members are not that useful, because `PbList` doesn't provide much over the standard library `List`, and `MyMessage.createRepeated()` can be replaced with `<MyMessage>[]`. To reduce generated code sizes and dependencies to `PbList`, remove the `createRepeated` members.
Configuration menu - View commit details
-
Copy full SHA for bed508e - Browse repository at this point
Copy the full SHA bed508eView commit details
Commits on Nov 3, 2025
-
Don't iterate iterable arguments twice in PbList (#1070)
Update `PbList` methods that update the list with an `Iterable` argument to avoid iterating the iterable twice: once for checking the element validity and once again for actually adding the values. Methods updated: - addAll - insertAll - replaceRange - setAll - setRange Exception handling behavior before this PR was undefined (same as the standard library `List`), and it's slightly changed with this PR: - addAll: previously if the iterator throws the list was left unchanged, now the elements until the exception will be added. - Other methods: exception behaviors are now the same as the standard library `List` methods. It's hard to tell whether the previous behavior was the same or different with the standard library `List` methods, as the exception behavior of those are undefined. To avoid allocating new iterators when a check function is not available, we have conditionals in each of these methods and call the standard library `List` methods directly when there isn't a check function. To avoid increasing number of cases needed to be tested, we don't special case iterable types like `PbList` and `List` in these methods. When the check function is available we simply `map` them with the check function. Otherwise call the same method on `wrappedList` directly. Fixes #730.
Configuration menu - View commit details
-
Copy full SHA for 4dfedaf - Browse repository at this point
Copy the full SHA 4dfedafView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff protoc_plugin-v23.0.0...protoc_plugin-v24.0.0