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

Add structured swift represntation for the generated metadata #2117

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Nov 14, 2024

Motivation:

The code gen as it stands tests too much in one go: a small change leads to many tests being updated. This stems from the translator not being very testable. To improve this, and make future code gen changes less painful, we can refactor it such that helpers build structured swift. These are significantly less coupled and can be tested more easily.

The strategy here is to add all the structured representations for the metadata, client, and server and then cut over the translators to using the new code. This first change will introduce the structured represntation for metadata.

Modifications:

  • Add metadata structured swift
  • Add helpers for commonly used types

Result:

Metadata is in place

Motivation:

The code gen as it stands tests too much in one go: a small change leads
to many tests being updated. This stems from the translator not being
very testable. To improve this, and make future code gen changes less
painful, we can refactor it such that helpers build structured swift.
These are significantly less coupled and can be tested more easily.

The strategy here is to add all the structured representations for the
metadata, client, and server and then cut over the translators to using
the new code. This first change will introduce the structured
represntation for metadata.

Modifications:

- Add metadata structured swift
- Add helpers for commonly used types

Result:

Metadata is in place
@glbrntt glbrntt requested a review from gjcairo November 14, 2024 13:27
@glbrntt glbrntt added the semver/patch No public API change. label Nov 14, 2024
@glbrntt glbrntt requested review from rnro and removed request for gjcairo November 18, 2024 09:56
Copy link
Collaborator

@rnro rnro left a comment

Choose a reason for hiding this comment

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

Looks good!

@glbrntt glbrntt merged commit c960d06 into grpc:main Nov 18, 2024
43 of 45 checks passed
@glbrntt glbrntt deleted the v2/metadata-structured-swift branch November 18, 2024 14:07
glbrntt added a commit to glbrntt/grpc-swift that referenced this pull request Nov 18, 2024
Motivation:

Follow-up from grpc#2117, we also need the server code.

Modifications:

- Add structured swift for server code

Result:

Can build server code from structured swift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants