[Solana] Request: Use version ranges
nevi-me opened this issue · 2 comments
I would like to suggest a feature request for Solana.
To the extent practicable, it would be great to supply a version range on solana-*
dependencies (https://github.com/pyth-network/pyth-sdk-rs/blob/main/pyth-sdk-solana/Cargo.toml#L25-L26).
A lot of projects have been on 1.10 for a while, and with recent QOL changes to the network, there's more incentive for us to move to 1.11 and beyond.
For core libraries like Pyth, sometimes specifying a specific minor version can lead to us having to temporarily fork when there's dependency conflicts.
It could be better to instead supply a version range on the cargo file, with the last tested release set as the upper bound (e.g. solana-sdk = "<1.14"
.
If this is a reasonable solution, I can create a PR and test locally to find the right version to set as the maximum.
Thanks
Thanks for raising this issue.
In general it sounds reasonable to me. Although we haven't pinned the version and using 1.11
and depending on the pyth-sdk should be fine 🤔 Can you explain more how it caused the conflict problem?
I would like to avoid the upper bound but solana does not follow semantic versioning so we should handle it manually.. Have you tested 1.14
, what was the result?
Hey @ali-bahjati, I hadn't tested 1.14 as it seemed validators are on 1.13, I'll test it shortly. There's no real constraint on why we can't use < 15
as the upper bound.
The crate conflict mostly comes when using Anchor or other crates that pin versions, you can end up in a state where say pyth-sdk wants version x but your pinned versions are different.
I came across this issue while dealing with a long line of conflicts. Most were with our internal crates, a few external deps already used ranges so they were fine, and pyth was one of the external ones that needed some action.