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

Read unknown fields even on empty messages #670

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

jcready
Copy link
Contributor

@jcready jcready commented Jan 27, 2025

Fixes #669

Copy link
Owner

@timostamm timostamm left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@@ -34,21 +34,6 @@ export class InternalBinaryRead implements CustomMethodGenerator {
make(source: TypescriptFile, descriptor: DescriptorProto): ts.MethodDeclaration[] {
const methods: ts.MethodDeclaration[] = [];

// if the message has no fields, we produce a much shorter body:
Copy link
Owner

Choose a reason for hiding this comment

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

Messages with zero fields should be rare. This probably wasn't very useful.

@timostamm timostamm merged commit 326fc6d into timostamm:main Jan 29, 2025
1 check passed
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.

Addition of field on empty message breaks backward compatibility
2 participants