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

chore: forces the protobuf version to be 3.2.0 #256

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

kerber0x
Copy link
Contributor

Description and Motivation

This PR forces the protobuf version to be exactly 3.2.0 to avoid issues with other dependencies trying to pull a different (higher) version.

Related Issues


Checklist:

  • I have read Migaloo's contribution guidelines.
  • My pull request has a sound title and description (not something vague like Update index.md)
  • All existing and new tests are passing.
  • I updated/added relevant documentation.
  • The code is formatted properly cargo fmt --all --.
  • Clippy doesn't report any issues cargo clippy -- -D warnings.
  • I have regenerated the schemas if needed cargo schema.

Copy link

codecov bot commented Jan 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (35dd827) 94.41% compared to head (c59e36f) 94.41%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #256   +/-   ##
=======================================
  Coverage   94.41%   94.41%           
=======================================
  Files         218      218           
  Lines       24777    24777           
=======================================
  Hits        23393    23393           
  Misses       1384     1384           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -28,7 +28,7 @@ cw20 = "1.0.1"
cw20-base = { version = "1.1.0", features = ["library"] }
cw-storage-plus = "1.1.0"
cw-utils = "1.0.1"
protobuf = { version = "3.2.0", features = ["with-bytes"] }
protobuf = { version = "=3.2.0", features = ["with-bytes"] }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the equal force it, I thought just specifying a dep with a version was enough

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought so too! Apparently omitting it equals ^, which is basically means:

1.2.3 := >=1.2.3, <2.0.0

So the minimum version becomes 3.2.0 in our case, but it can go up to 4.0.0 (excluding). I remember we got issues with protobuf in the past because suddenly some new version appeared. The = forces the crate (and its dependencies) to use that version even if another package could pull a newer version.

See this for reference:
https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-path-dependencies

@kerber0x kerber0x merged commit 067ae80 into main Jan 25, 2024
6 checks passed
@kerber0x kerber0x deleted the fix/force-protobuff-version branch January 25, 2024 22:55
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