-
-
Notifications
You must be signed in to change notification settings - Fork 684
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
protoc import should not conflict with option override anymore #1537
Conversation
Thanks for working on this. Could you explain exactly what options gogofaster adds that will be overridden? Sorry I'm not all that familiar with gogo. I'm wondering if we should adjust which arguments are passed to the builder from the rules instead of fixing this in the builder. At minimum, this should be carefully explained in a comment somewhere. |
I tried to avoid to change too much code. |
I think I understand. So if you're using I can see how this PR prevents that override, but I think you're still going to have the wrong dependency, and you'll end up linking code from two different proto systems. Instead, I think we need to define a Does that make sense? If so, I'll close this PR and add a note to #1548, then fix this in the next few weeks. Again, I don't have a complete understand of gogo protobuf, |
the current pr is working perfectly fine. You can mix google and gogo imports. |
Or you could merge this one and remove the code when your solution will be ready |
I'm not sure it's safe to mix golang/protobuf and gogo/protobuf. This article mentions that they register with different backends, which is consistent with my understanding. It sounds like the situation is improving though. If this change is working for you, I'd encourage you to continue using it internally until a fix is ready. I hope to have something ready before the next major release (first half of July). |
I've added a note in #1548, and I'll close this PR now. I'm sorry this is as broken as it is. I think we will end up with something much more useful soon though. |
Problem:
Protoc is appending the "-import" as "-option M". But with gogofaster compiler some "-option M" are added and will be override by the default import, which is not what we want.
Solution:
append the "-import" as "-option M" only if the "-option M" is not already set. This should avoid overriding compiler options.