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

[bugfix] Fix incorrect package name extraction for nested messages #21

Conversation

zhihuizhang17
Copy link
Contributor

@zhihuizhang17 zhihuizhang17 commented Jan 2, 2024

Summary

The package_from_name/1 method in Builder.Util currently extracts an incorrect package name when given a nested message name.

For example:

>  Util.package_from_name("testServiceV3.TestRequest.Payload")
"testServiceV3.TestRequest"

It's supposed to return: testServiceV3

This PR fixes the issue by keeping only the outermost module component as the package name for any nested message input.

fixes #20

@zhihuizhang17 zhihuizhang17 changed the title [bugfix] Incorrect Package Name Parsing [bugfix] Fix incorrect package name extraction for nested messages Jan 2, 2024
@zhihuizhang17 zhihuizhang17 marked this pull request as ready for review January 2, 2024 10:26
@mjheilmann mjheilmann merged commit 20d579d into elixir-grpc:main Jan 3, 2024
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.

Incorrect Package Name Parsing
2 participants