-
Notifications
You must be signed in to change notification settings - Fork 17
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
fix: add commands for generating go types #16
Conversation
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.
Note: I'm observing that when I run make proto-gen-docker
or make proto-gen
, there are changes to these files:
modified: merkle/proto/proof.pb.go
modified: pkg/blob/blob.pb.go
Makefile
Outdated
## proto-gen-docker: Generate protobuf files. Requires docker. | ||
proto-gen-docker: | ||
@echo "--> Generating Protobuf files" | ||
$(DOCKER_BUF) generate | ||
.PHONY: proto-gen-docker | ||
|
||
## proto-gen: Generate protobuf files. Requires buf. | ||
proto-gen: | ||
@echo "--> Generating Protobuf files" | ||
@buf generate | ||
.PHONY: proto-gen |
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.
[question] do we want to support two different ways to generate the Protobuf files? I think it may be easier to maintain just one option and if that option is used in CI as well as locally. Since the make proto-gen
command depends on a locally installed Buf CLI, preference for the Docker approach.
Ideally the Docker approach uses the same version of Buf locally and in CI.
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.
We could probably look to enforce it somehow. The docker image also isn't versioned (I actually had a problem where it wasn't working because I had an old image.
I think some people don't like using docker, hence why I added the other option, but it's simple enough that it probably doesn't need a make command so I will remove it
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.
Yea I think the Docker approach should also be versioned but not blocking on it.
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.
LGTM!
We might have different versions - let me dig into it |
Co-authored-by: Rootul P <[email protected]>
If it helps debug:
|
It is the case for me too. |
Okay I had an older version of buf. I'm going to hardcode the version to 1.28.1 in the Makefile so hopefully that produces constant results |
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.
make proto-gen
results in no changes and make proto-lint
results in no issues. Thanks!
Hmm we need to update settings on this repo so that new commits dismiss previous PR approvals. |
Done. I've also made it require two reviews like the other repos |
Closes: #13