This repository has been archived by the owner on Feb 23, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
update proto generation and testing pipelines #358
update proto generation and testing pipelines #358
Changes from 9 commits
a608b3a
bbff7a1
6f06132
df34c12
a63908a
2f2260a
5dddbbe
45d65dd
2617883
5f16657
ee8350a
ba46bcc
ccb18c2
e134bdc
d702a45
6b41e52
468f31e
378b0c6
31af36d
efd2a39
bfed5d6
9b12bde
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
what the new process here? generate in spec then move over?
I think for go this is required? (I can't remember exactly)
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.
when this is imported into Tendermint, will it not cause package issues?
package tendermint_abci
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.
whoops, never mind, I read the other PR now.
The only downside of doing it this way is, users of our photo files will need to append option go_package as well, this could cause confusion. Before it was plug and play.
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.
Unfortunately, this is really a downside of hosting the protos in the spec repo in general. If users were to try to generate these protos themselves using the old
option
, they would have created protos with import paths that do not match their local module name. As a result of this, they would have two options, both of which are not ideal.Option 1. Rewrite the import paths locally, either before or after proto generation so that the paths match the local module. This is effectively what we are changing Tendermint to do.
Option 2. Shove the protos into the
vendor
directory, where packages are allowed to have a name that does not match the module name, but is also a directory that go programmers frequently cede to thego mod
tooling to manage.Neither option is great, and I think we can all agree that using the module name
github.com/tendermint/tendermint
in this package is strictly incorrect. If this solution causes serious headache for users who are attempting to vendor these protos into their localvendor
directory, we can reconsider, but it also seems odd to me that a user would do that and not simply import the generated protos that exist within the Tendermint repository instead since they are effectively equivalent.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.
The issue is that when the user imports the proto file into there proto file and generate their files the go import will be set to something else that isn't actually importing a file. This is how it is currently done for all go projects.
It's fine if we break this, wanted to make note of it mainly
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.
Makes sense, do you know of people doing this?