Move .proto file and add caching of protoc and protoc-gen-go during build#46
Move .proto file and add caching of protoc and protoc-gen-go during build#46bwplotka merged 1 commit intoprometheus:masterfrom bufdev:update
Conversation
|
If we had the pen here, there's some other clean ups I'd do to We can also make it so that the path to the go package doesn't change, let me know if that's a requirement. |
|
That looks very cool.
Yes, I think that's very important. I think we need to ensure that nothing changes from the Go side. And AFAICS, in this PR only the path to the Go package is a relevant change. |
|
@newhook could you verify that everything looks still good from your side with this PR in? (Modulo not changing the path to the Go package.) |
|
Updated. The diff is because you have a bug in this repository currently - your |
|
I fixed your |
|
I also added a simple In a follow-up, I can move you to |
…uild Signed-off-by: bufdev <bufdev-github@buf.build>
| PROTOC := tmp/versions/protoc/$(PROTOC_VERSION) | ||
| PROTOC_BIN := tmp/bin/protoc | ||
| PROTOC_INCLUDE := tmp/include/google | ||
| $(PROTOC): |
There was a problem hiding this comment.
While we are here.. can we just use... Buf? (:
There was a problem hiding this comment.
As commented here, we'll do it in a follow-up
| # Need to be on a previous version that doesn't cause the updated WKT go_package values to be added. | ||
| PROTOC_VERSION := 3.13.0 | ||
| # This has been around for a while. | ||
| PROTOC_GEN_GO_VERSION := v1.3.5 |
There was a problem hiding this comment.
In theory we could use bingo too, to avoid so much things in Makefile to maintain: https://github.com/openproto/protoconfig/blob/main/go/Makefile#L52
We can do that in follow ups |
|
Yeah, let's not do too much in one (bin)go… |
This does a lot of stuff, but primarily deals with the #44 and #45 problems.
This does change the outputted go package - let me know if this is not OK.
This also makes sure that a consistent version of
protocandprotoc-gen-goare used. This repository is using a very old version of both, but we want to be consistent. I would recommend moving tobufinstead, and upgrading to a newer version ofprotoc-gen-go, and can help with that if you want.