Conversation
beacon/Cargo.toml
Outdated
| prost = { workspace = true } | ||
| rand = ">=0.8" | ||
| rand_chacha = ">=0.3" | ||
| rand = ">=0.9" |
There was a problem hiding this comment.
Would 0.8 work as lowest version?
There was a problem hiding this comment.
In case you want to explicitly set rand = 0.8 for this dependency—I think not. The breaking changes arrived in 0.9
But, I've tested the oracles repo with this branch. It has 3 different rand version inside and it compiles successfully
oracles on use-new-rand [?] via 🦀 v1.83.0 on ☁️ akurotych@nova-labs.com took 4s
❯ cargo tree -i rand
error: There are multiple `rand` packages in your project, and the specification `rand` is ambiguous.
Please re-run this command with one of the following specifications:
rand@0.7.3
rand@0.8.5
rand@0.9.0
There was a problem hiding this comment.
I meant >= 0.8 but that would break because it picks up 0.9, right?
I usually try to avoid many versions of crates. It works but bloats the binary size.
The usual way to fix this is with -
=0.8 to avoid yet another copy
There was a problem hiding this comment.
I meant >= 0.8 but that would break because it picks up 0.9, right?
Yes, correct
I usually try to avoid many versions of crates. It works but bloats the binary size.
The usual way to fix this is with -
...
=0.8 to avoid yet another copy
Pining version to =0.8 is the another way to fix this problem. I don't have any strong opinion which way is better.
Do you prefer pining the version to 0.8?
There was a problem hiding this comment.
Yes please. Reducing duplicates is good
There was a problem hiding this comment.
Yes please. Reducing duplicates is good
Done. I've reverted code changes and set an upper bound on supported rand versions to give Cargo more freedom in choosing the rand version.
beacon/Cargo.toml
Outdated
| prost = { workspace = true } | ||
| rand = ">=0.8" | ||
| rand_chacha = ">=0.3" | ||
| rand = "<=0.8.5" |
set an upper bound on supported rand versions