anza-xyz / agave

Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.
https://www.anza.xyz/
Apache License 2.0
212 stars 81 forks source link

Multiple packages allow `solana-program@2` #1869

Open Buzzec opened 4 days ago

Buzzec commented 4 days ago

Problem

spl-discriminator@0.1.1, spl-pod@0.1.1, spl-program-error@0.3.1, spl-tlv-account-resolution@0.5.2, and spl-type-length-value@0.3.1 all depend on solana-program with

[dependencies.solana-program]
version = ">=1.17.17,<=2"

This is incorrect because it allows solana-program@2.

This should be

[dependencies.solana-program]
version = ">=1.17.17,<2"

solana-client@<2 requires these packages and cannot be used anymore. solana-client@>=2 contains compile errors.

Proposed Solution

Yank all crates that could rely on solana-program@2 now that it's published.

Workaround

You can get the lock file to not use solana-program@2 if you first add solana-sdk, build, and then add solana-client. This is a very fickle solution and could break whenever a new update is pushed to any crate.

acheroncrypto commented 4 days ago

This is an SPL issue an is being tracked in https://github.com/solana-labs/solana-program-library/issues/6897.