-
Notifications
You must be signed in to change notification settings - Fork 171
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
Don't use reserved words as function names in generated service #61
Don't use reserved words as function names in generated service #61
Conversation
Thanks for raising 😀
Thanks |
@jonnyreeves so it looks like #56 actually stopped the tests from running 😢You can see in the Travis build that 0 test ran - https://travis-ci.org/improbable-eng/ts-protoc-gen/builds/361377789?utm_source=github_status&utm_medium=notification
My guess is it's this line. I've add a look at trying to fix them but getting a failing test - #62 |
d4e5432
to
531a16b
Compare
@jonnyreeves ok all fixed now - using the |
531a16b
to
fb9fee2
Compare
message StreamRequest { | ||
string some_string = 1; | ||
} | ||
|
||
service SimpleService { | ||
rpc DoUnary(UnaryRequest) returns (othercom.ExternalChildMessage) {} | ||
rpc DoStream(StreamRequest) returns (stream othercom.ExternalChildMessage) {} | ||
|
||
// checks that rpc methods that use reserved JS words don't generate invalid code | ||
rpc Delete(UnaryRequest) returns (UnaryResponse) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a test to ensure methods are appropriately prefixed?
Morning @jonahbron, the example protos have been moved by the change landed in #55, you will need to rebase your changes. Also, as requested, please can you add a test-case so we don't accidentally regress on this feature in the future? Thanks :) |
fb9fee2
to
c0cc43b
Compare
@jonnyreeves rebased and added a test to check the name of the generated function. Also all 91 tests are now running on this branch instead of just the 70 on master. This is because the test glob was not including the |
c0cc43b
to
b21af7b
Compare
Thanks @jonbretman; I'll look to roll out a new release of ts-protoc-gen at some point this week; hopefully we can also get the fix for #67 in as well. |
normaliseFieldObjectName
to avoid invalid syntaxtest/service/grpcweb.ts