Skip to content
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

build: vendor protos via buf #2680

Merged
merged 1 commit into from
Jun 6, 2023
Merged

build: vendor protos via buf #2680

merged 1 commit into from
Jun 6, 2023

Conversation

conorsch
Copy link
Contributor

@conorsch conorsch commented Jun 6, 2023

Updates the protobuf build process to use buf to pull in the relevant upstream proto definitions from BSR. We intentionally pin older versions of the cosmos deps, cosmos-sdk & ibc, for compatibility. The most recent version of cosmos/ibc doesn't integrate with our existing tooling, due to introduction of new "extension" and "extension_signature" attributes on the tendermint::vote type, but we'll tackle updating that later.

Only a single change was made to our proto compiler tool: excising a manual import of a tendermint "query.rs" codegen file, which is no longer exported from the sdk protos. Removing it did not break the build, so we weren't using the functionality in that file. The rest of the diff to proto-compiler is updating relpaths.

The proto specs now live at a top-level proto/ dir, and alongside the vendored protos. Those directories are used as inputs to the build. Relevant docs have been updated.

Towards #2184.

Updates the protobuf build process to use `buf` to pull in the relevant
upstream proto definitions from BSR. We intentionally pin older versions
of the cosmos deps, cosmos-sdk & ibc, for compatibility. The most recent
version of cosmos/ibc doesn't integrate with our existing tooling, due
to introduction of new "extension" and "extension_signature" attributes
on the tendermint::vote type, but we'll tackle updating that later.

Only a single change was made to our proto compiler tool: excising a
manual import of a tendermint "query.rs" codegen file, which is no
longer exported from the sdk protos. Removing it did not break the
build, so we weren't using the functionality in that file. The rest of
the diff to proto-compiler is updating relpaths.

The proto specs now live at a top-level `proto/` dir, and alongside
the vendored protos. Those directories are used as inputs to the build.
Relevant docs have been updated.

Towards #2184.
@conorsch conorsch force-pushed the buf-export-to-proto-compiler branch from 3ccd843 to 5555683 Compare June 6, 2023 17:35
@conorsch conorsch temporarily deployed to smoke-test June 6, 2023 17:35 — with GitHub Actions Inactive
@conorsch conorsch marked this pull request as ready for review June 6, 2023 17:59
@conorsch
Copy link
Contributor Author

conorsch commented Jun 6, 2023

There's a breaking change noted in the buf lints: that's accurate, we've updated the associated protos. Because the rust build is succeeding based on those regenerated files, the breaking change is acceptable. Post-merge, I'll need to update the CI check that looks for breaking changes by subdir, crates/proto/ -> proto/.

@conorsch conorsch merged commit 8eeb906 into main Jun 6, 2023
5 of 6 checks passed
@conorsch conorsch deleted the buf-export-to-proto-compiler branch June 6, 2023 18:21
conorsch pushed a commit that referenced this pull request Jun 6, 2023
conorsch pushed a commit that referenced this pull request Jun 7, 2023
Follow up to #2680. Cleans the output directories for proto codegen
prior to generation, to ensure that the codegen is complete across
all targets: vendoring, rust, and go. Previously, we were only cleaning
the vendor dir. Removed a few unused protos from the build process as a
result.
hdevalence pushed a commit that referenced this pull request Jun 8, 2023
Follow up to #2680. Cleans the output directories for proto codegen
prior to generation, to ensure that the codegen is complete across
all targets: vendoring, rust, and go. Previously, we were only cleaning
the vendor dir. Removed a few unused protos from the build process as a
result.
@cratelyn cratelyn added the protobuf-changes Makes changes to the protobuf definitions. label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protobuf-changes Makes changes to the protobuf definitions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants