-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Refactor registry and generator to use protogen #1756
Refactor registry and generator to use protogen #1756
Conversation
a4c2cd9
to
f5ab5eb
Compare
That's cool, this PR is taking long time so it's expected. I think I will have it ready today/tomorrow. I just fixed the last test, yay! No problem at all, it's a great open source tool and I am glad I can give something to the community as well :) |
f5ab5eb
to
e36c9b0
Compare
@johanbrandhorst I can't reproduce this failed bazel build. I run both |
Is it possible that |
Oh yeah, that might be it, thanks! I refactored code to |
c154246
to
6e11457
Compare
I needed to revert usage of In generated
|
Yeah, I had a similar experience, I think it's going to take until rules_go has switched to a reasonably recent version of golang/protobuf. Just leave it for now, I will be making that change when we can. |
Got it. In my opinion, it's good for a thorough review. There are still two todo items in the description but I think whatever will result from them, it will be a separate issue. |
Could you rebase on master again please? I just merged another PR that affects these files. |
This reverts commit 953a114.
6e11457
to
37650a5
Compare
Codecov Report
@@ Coverage Diff @@
## master #1756 +/- ##
==========================================
- Coverage 57.86% 57.28% -0.58%
==========================================
Files 34 34
Lines 3669 3615 -54
==========================================
- Hits 2123 2071 -52
+ Misses 1286 1284 -2
Partials 260 260
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice to see all the logic we can move out and consume from protogen, nice work! I'm curious about some of the flag removals and the test removals, should we worry that this will break any users? The removal of the module
flag for example, does that now get consumed by protogen?
I removed four flags:
The problem might be with different interpretation of these flags. I tried to figure this out and it looked the same but that might not be 100% true. Regarding the removed tests, I removed everything related to methods that were also removed. The main important thing that got removed was generating the output path (for example |
Ugh, we really should've got that |
References to other Issues or PRs
This is continuation of work submitted and merged in #1668.
Brief description of what is fixed or changed
This PR switches fully to google.golang.org/protobuf/compiler/protogen which is a new plugin to protoc to generate Go code.
The most important changes are:
-Mpath/to/another.proto=example.com/example
or-paths
to protoc-gen-goOther comments
The follow up work: