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

Make check for bundled protos more resilient #21

Merged
merged 2 commits into from
Dec 12, 2024
Merged

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Dec 11, 2024

Motivation:

The fix in #17 relies on SwiftProtobufPluginLibrary's WellKnownType type including all protos bundled by SwiftProtobuf, this turns out not to be true so in some case (like using the "Empty" proto) an import was missing.

Modifications:

  • Use the "isBundleProto" API which better suits our needs
  • Update test to use type which would fail test before fix

Result:

Better code gen

Motivation:

The fix in grpc#17 relies on `SwiftProtobufPluginLibrary`'s `WellKnownType`
type including all protos bundled by `SwiftProtobuf`, this turns out not
to be true so in some case (like using the "Empty" proto) an import was
missing.

Modifications:

- Use the "isBundleProto" API which better suits our needs
- Update test to use type which would fail test before fix

Result:

Better code gen
@glbrntt glbrntt requested a review from gjcairo December 11, 2024 08:11
@glbrntt glbrntt added the 🔨 semver/patch No public API change. label Dec 11, 2024
@glbrntt glbrntt merged commit 405d74c into grpc:main Dec 12, 2024
21 checks passed
@glbrntt glbrntt deleted the wkt-again branch December 12, 2024 10:29
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