Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make grpc gateway generate code at the correct location and alias at …
…the wrong location (#1333) Our patch to gRPC gateway had a [bug](#1223). It generated code at the wrong location: what should be generated at `foo/v1/v1gateway/filename.pb.gw.go` is generated at `foo/v1/filename/v1gateway/filename.pb.gw.go`. This fixes it by generating the code now at the correct location, but continuing to generate aliases (`Func = aliaspackage.Func`) at the incorrect location to stay backward compatible. ***Catch:*** However, if the user has both `foo/bar.proto` and `foo/bar/bar.proto`, `buf generate` will fail with `duplicate generated file name "foo/bar/foogateway/bar.pb.gw.go". Generation will continue without error here and drop the second occurrence of this file, but please raise an issue with the maintainer of the plugin.` But this should be very rare, and it shouldn't happen in general if the user uses managed mode and end their directory path with a version number. It's probably easier to review the actual [code diff](oliversun9/grpc-gateway@osn/initial-state...osn/alias). ***Question:*** I also assume that a revision will be generated on merge?
- Loading branch information