-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
import_prefix shouldn't be used for non-proto packages #181
Comments
/cc @jhump |
+1 To this proposal. |
|
+1 To this proposal as well. In its current state, I am also OK with adding a new parameter the performs the desired "proper" import prefix. Edit: I've fallen back to using the |
I really don't understand why you'd ever want the current behavior of I'm inclined to say that we should deprecate or remove |
The |
We're trying to figure out how to generate our protos into a subdirectory, so they don't collide with existing code. We also have a mix of our protos, and a few externally-created protos (eg. proto descriptors, etc.)
It almost works to use
import_prefix
to add a "protos" subdirectory on the front of every proto import.However, the
import_prefix
is also applied to three normal Go package imports: proto runtime, context package, grpc package.It's difficult to imagine a scenario where one would want to try to import
golang.org/x/net/context
from inside a generated-protobuf directory, especially given thevendor/
folder semantics.The text was updated successfully, but these errors were encountered: