Skip to content

Conversation

@osa1
Copy link
Member

@osa1 osa1 commented Oct 20, 2025

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.


cl/822982479

@osa1 osa1 marked this pull request as ready for review October 21, 2025 08:45
@osa1 osa1 requested a review from sigurdm October 21, 2025 08:46
@osa1 osa1 merged commit 5a44489 into google:master Oct 21, 2025
12 checks passed
@osa1 osa1 deleted the pb_list_lib branch October 21, 2025 09:20
osa1 added a commit that referenced this pull request Oct 21, 2025
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.
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Oct 27, 2025
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (https://github.com/dart-lang/dartdoc/compare/98d03ad..6d1aa6f):
  6d1aa6f5  2025-10-23  Sam Rawlins  Refactor Locatable into an interface, HasLocation (dart-lang/dartdoc#4118)
  f82cd35d  2025-10-23  Sam Rawlins  Remove unused extension method, replaced in analyzer 8.4.0 (dart-lang/dartdoc#4119)

protobuf (https://github.com/dart-lang/protobuf/compare/78cf743..7db0784):
  7db0784  2025-10-24  Ömer Sinan Ağacan  Avoid redundant nullability checks when updating repeated fields (google/protobuf.dart#1069)
  a77f9a6  2025-10-23  Ömer Sinan Ağacan  More field validation tests (google/protobuf.dart#1068)
  27730db  2025-10-21  Ömer Sinan Ağacan  Move PbMap to its own library (google/protobuf.dart#1066)
  9b4c46f  2025-10-21  Ömer Sinan Ağacan  More clearExtension tests: (google/protobuf.dart#1064)
  5a44489  2025-10-21  Ömer Sinan Ağacan  Move PbList to its own library (google/protobuf.dart#1063)

test (https://github.com/dart-lang/test/compare/8083c8f..5855358):
  58553580  2025-10-24  Nate Bosch  Add a sentence to clarify "Platform" (dart-lang/test#2550)

tools (https://github.com/dart-lang/tools/compare/5fe6ee6..e0cc0bc):
  e0cc0bcc  2025-10-27  Morgan :)  Test DirectoryWatcher exception on missing path. (dart-lang/tools#2224)
  e6ce99da  2025-10-24  Morgan :)  Test new link to directory races, fix for them (dart-lang/tools#2223)
  9053fae7  2025-10-24  Morgan :)  Check file sizes as well as "last modified" times. (dart-lang/tools#2221)

Change-Id: Ica6937ba0af21c5ba435e97bd0673fbe7b3043cc
Tested: update test goldens
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457800
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
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 this pull request may close these issues.

2 participants