Skip to content

bump tonic, tonic-build to 0.13.0, set msrv to 1.75 #520

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

Merged
merged 3 commits into from
Mar 27, 2025

Conversation

SuperFluffy
Copy link
Contributor

@SuperFluffy SuperFluffy commented Mar 26, 2025

This patch updates tonic to 0.13.0 and sets the minimal supported rust version to 1.75, which is also reflected in rust-toolchain and all workflow files.

A new release of cosmos-sdk-proto and cosmrs would require a bump in the major version to 0.27 and 0.22 respectively because the dependencies are part of the public API.

I am not sure what the workflow of this project is - if desired I can bump the versions here or in a followup PR.

A timely release would be very much appreciated because I am in the process of updating a couple of fundamental dependencies over at penumbra and astria. :-)

NOTE: I did bump prost-build and ran it as cd prost-build && cargo run, but it seemingly did not update any of the generated code (which of course leads to compilation errors).

Not completely sure if that's a me-error or what's going on here.

The problem is that this crate relies on the neoeinstein-tonic plugin. I will try and get a tonic version bump upstreamed.

PR to update protoc-gen-tonic: neoeinstein/protoc-gen-prost#119

@SuperFluffy
Copy link
Contributor Author

PR into neoeinstein/prost-gen-prost: neoeinstein/protoc-gen-prost#119

@tony-iqlusion
Copy link
Member

@SuperFluffy if you can regen using a local copy of neoeinstein/prost-gen-prost we can potentially get this merged

@SuperFluffy
Copy link
Contributor Author

SuperFluffy commented Mar 26, 2025

@tony-iqlusion gotcha, good to know. Let me figure out how to run buf using a local fork.

@SuperFluffy
Copy link
Contributor Author

SuperFluffy commented Mar 27, 2025

@tony-iqlusion Done and pushed to b590568. Steps to reproduce:

# Compile a local copy of protoc-gen-tonic
$ git clone https://github.com/neoeinstein/protoc-gen-prost \
&& cd protoc-gen-prost \
&& git fetch origin pull/119/head:bump-tonic \
&& git switch bump-tonic \
&& cargo build --release -p protoc-gen-tonic

Then change the contents of proto-build/buf.sdk.gen.yaml to point to the local artifact:

version: v1
plugins:
  - plugin: buf.build/community/neoeinstein-prost:v0.3.1
    out: .
    opt:
      - compile_well_known_types
      - enable_type_names
      - extern_path=.google.protobuf=::tendermint_proto::google::protobuf
      - extern_path=.tendermint=::tendermint_proto
  - plugin: buf.build/community/neoeinstein-prost-serde:v0.3.0
    out: .
  # - plugin: buf.build/community/neoeinstein-tonic:v0.3.0
  - plugin: tonic
    path: /home/superfluffy/protoc-gen-prost/target/release/protoc-gen-tonic
    out: .

Then regenerate the files as cd proto-build && cargo run

@SuperFluffy
Copy link
Contributor Author

Looks like wasmd needed a similar treatment, which I overlooked and fixed with the latest commit. Apologies for that.

@tony-iqlusion tony-iqlusion merged commit 1cf4103 into cosmos:main Mar 27, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants