Replies: 6 comments 4 replies
-
Thanks for proposing this, @frantjc! We've gone back and forth on this, most recently in #70. We'd rather not do this because it makes it hard to move away from local code generation. With the current approach, you can That said, we're willing to add an option if there's significant interest. I'm going to convert this issue to a discussion and wait a bit to see if it accumulates a bunch of upvotes or comments. |
Beta Was this translation helpful? Give feedback.
-
@frantjc , I did not know you asked the same thing I need (#389). @akshayjshah I hope you put this behavior behind a flag, for example I wanted to switch from |
Beta Was this translation helpful? Give feedback.
-
Thank you all. I have successfully replaced |
Beta Was this translation helpful? Give feedback.
-
I understand (and agree) that it's cleaner to generate a separate package. However, not exposing the option to generate in the same output package and directory (as most plugins do) means that A specific example is that |
Beta Was this translation helpful? Give feedback.
-
I am open to create the PR for this feature |
Beta Was this translation helpful? Give feedback.
-
I am not familiar with bazel, but I wonder if it is possible to generate a subfolder inside the Having different output path is a terrible user experience when switching local buf to bazel, as it changed the import path of ConnectRPC. |
Beta Was this translation helpful? Give feedback.
-
I had a use-case where I wanted
.connect.go
files generated withprotoc-gen-connect-go
to output to the same directory as.pb.go
files generated withprotoc-gen-go
.The reason I needed this was to preserve import paths when switching from Go structs that I'd written myself with ones generated from
.proto
files. The same package previously referenced Service Clients generated byprotoc-gen-grpc-go
which, when extracted to the___connect
package thatprotoc-gen-connect-go
outputs to, caused an import cycle.I forked and modified
proton-gen-connect-go
to never append the___connect
part to the import path and I would like to contribute it back upstream. However, I was hoping for some direction on what flag I should check to disable appending___connect
to the import path: an environment variable? A flag passed toprotoc-gen-connect-go
? Something else entirely?Hope that was clearly articulated. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions