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

Fix code generator bug and add tests #844

Merged
merged 1 commit into from
Jun 6, 2020

Conversation

stanley-cheung
Copy link
Collaborator

Fixes #837

The bug was caused by #780 - when fixing an issue with a missing dot, a section of the code was inadvertently removed, which handles nested messages.

So the fix is to handle both cases :)

What's challenging is to add tests to make sure both cases won't be broken by new changes to the code generator.

The test case in #837 is reflected in the test01.proto introduced by this PR.
The test case in #693 is reflected in test02.proto and test03.proto.

The tests

  • run the code generator on these protos,
  • run tsc on them to make sure they compile (using an entry point clientXX.ts, which imports these generated protos),
  • load the compiled JS files and run some tests on them (especially on things that broken above).

@stanley-cheung stanley-cheung merged commit 05029f3 into grpc:master Jun 6, 2020
@stanley-cheung stanley-cheung deleted the code-generator-fix branch June 6, 2020 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[1.1.0] Namespace missing for an inner message
1 participant