Skip to content

fix(sidekick/swift): use fast WKTAny helpers - #7826

Merged
chingor13 merged 2 commits into
mainfrom
fix-swift-issue-11
Oct 28, 2026
Merged

chingor13 merged 2 commits into
mainfrom
fix-swift-issue-11

Conversation

@chingor13

@chingor13 chingor13 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Generated Swift messages now call _anySerialize and _anyDeserialize instead of _slowAnySerialize and _slowAnyDeserialize in their _AnyPackable conformance implementations.

Previously, packing and unpacking messages into WKTAny serialized through intermediate JSON bytes via ProtoJSONEncoder and ProtoJSONDecoder. The new helpers use WKTStructEncoder and WKTStructDecoder to convert directly between Codable messages and WKTStruct in memory.

Towards googleapis/google-cloud-swift#11
Generation PR: googleapis/google-cloud-swift#1544

Generated Swift messages now call _anySerialize and _anyDeserialize instead of _slowAnySerialize and _slowAnyDeserialize in their _AnyPackable conformance implementations.

Previously, packing and unpacking messages into WKTAny serialized through intermediate JSON bytes via ProtoJSONEncoder and ProtoJSONDecoder. The new helpers use WKTStructEncoder and WKTStructDecoder to convert directly between Codable messages and WKTStruct in memory.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Swift message template (message.gotmpl) to use _anyDeserialize and _anySerialize instead of _slowAnyDeserialize and _slowAnySerialize. It also updates the corresponding tests in generate_message_swift_test.go and generate_oneof_test.go to reflect this change. There are no review comments to address, and I have no feedback to provide.

@chingor13
chingor13 marked this pull request as ready for review October 27, 2026 21:37
@chingor13
chingor13 requested a review from a team as a code owner October 27, 2026 21:37
@chingor13
chingor13 merged commit b6c93c5 into main Oct 28, 2026
85 of 87 checks passed
@chingor13
chingor13 deleted the fix-swift-issue-11 branch October 28, 2026 15:07
zhumin8 pushed a commit that referenced this pull request Nov 3, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.51.0](v0.50.0...v0.51.0)
(2026-10-31)


### Features

* **dart:** support per-call retry
([#7787](#7787))
([24344b6](24344b6))
* **sidekick/rust:** convert proto2 optionals
([#7867](#7867))
([c9629b6](c9629b6))
* **sidekick:** mark `proto2` optional fields
([#7865](#7865))
([b91651f](b91651f))


### Bug Fixes

* **dart:** do not delete CHANGELOG.md
([#7817](#7817))
([4f027cb](4f027cb))
* **dart:** restore package description position
([#7370](#7370))
([bac42b7](bac42b7))
* **internal/librarian/dart:** set initial `librarian.yaml` version on
`bump` ([#7808](#7808))
([9f9042e](9f9042e))
* **internal/serviceconfig:** add title for shopping merchant reviews v1
([#7805](#7805))
([bf53ece](bf53ece))
* **internal/serviceconfig:** add title for shopping merchant reviews v1
([#7805](#7805))
([affbeb4](affbeb4))
* **sidekick/swift:** use fast WKTAny helpers
([#7826](#7826))
([b6c93c5](b6c93c5))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.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