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

Pin the dependencies of the Rust code gen tools #502

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

duskmoon314
Copy link
Contributor

In the previous commit, only the version of protoc-gen-prost/tonic was pinned. However, Cargo would still ignore the lock file and use the latest version of dependencies for protoc-gen-prost/tonic. This meant that any new release of dependencies (such as prost-build) could result in differences in the generated code.

This commit addresses the issue by adding --locked to the cargo install command, ensuring Cargo respects the lock file when installing code generation tools.

The Rust code has been regenerated using this updated configuration.

In the previous commit, only the version of `protoc-gen-prost/tonic` was
pinned. However, Cargo would still ignore the lock file and use the
latest version of dependencies for `protoc-gen-prost/tonic`. This meant
that any new release of dependencies (such as `prost-build`) could
result in differences in the generated code.

This commit addresses the issue by adding `--locked` to the `cargo
install` command, ensuring Cargo respects the lock file when installing
code generation tools.

The Rust code has been regenerated using this updated configuration.

Signed-off-by: Campbell He <kp.campbell.he@duskmoon314.com>
@duskmoon314
Copy link
Contributor Author

There are 206 additions and 56 deletions. Changes in rust code are caused by the version of prost being pinned back to the lock file of protoc-gen-prost rather than the version of the last time we built it.

@chrispsommers chrispsommers merged commit 31517d4 into p4lang:main Sep 24, 2024
5 checks passed
@chrispsommers
Copy link
Collaborator

It worked, thanks again @duskmoon314 for fixing this so quickly!

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