You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the buf.build/connectrpc/kotlin plugin, if a service and a nested message inside a response share the same name (e.g., MytestService and ListMytestsResponse.Mytest), the generated ServiceClient and ServiceClientInterface incorrectly reference the nested message type directly instead of using the expected outer class (MytestOuterClass). This results in compilation errors because the referenced type does not exist.
The generated Kotlin code for MytestServiceClient and MytestServiceClientInterface references Mytest, which does not exist, instead of MytestOuterClass.
The text was updated successfully, but these errors were encountered:
@akosyakov, is the name of the file mytest.proto? If not, please provide that, too.
Also, is that the entirety of the input proto source and the buf.gen.yaml? I just want to confirm there are no file options or managed mode config, missing from the examples above, that might impact code gen.
Also, it's not clear why the MytestServiceClientInterface would reference the Mytest message at all, since the request and response types point to ListMytestsRequest and ListsMytestsResponse, not to Mytest. Maybe you could also provide a snippet of the actual generated code that is causing problems as well as the actual error output of the compiler?
Description
When using the
buf.build/connectrpc/kotlin
plugin, if a service and a nested message inside a response share the same name (e.g.,MytestService
andListMytestsResponse.Mytest
), the generatedServiceClient
andServiceClientInterface
incorrectly reference the nested message type directly instead of using the expected outer class (MytestOuterClass
). This results in compilation errors because the referenced type does not exist.Steps to Reproduce
The generated Kotlin code for
MytestServiceClient
andMytestServiceClientInterface
referencesMytest
, which does not exist, instead ofMytestOuterClass
.The text was updated successfully, but these errors were encountered: