coral-xyz / anchor

⚓ Solana Sealevel Framework
https://anchor-lang.com
Apache License 2.0
3.36k stars 1.25k forks source link

`anchor-spl` Upgrade to `solana-program v2.0.0` Causes Compilation Errors (Anchor v0.30.1, Solana v1.18.17) #3047

Closed lingcoder closed 1 week ago

lingcoder commented 1 week ago

Problem

The anchor-spl package automatically upgraded the solana-program version to 2.0.0. This upgrade has led to a series of compilation errors in my current project.

My project is still dependent on Solana version 1.18.17 and I am using Anchor version 0.30.1.

Steps to Reproduce

  1. Have a project dependent on solana 1.18.17.
  2. Use anchor-spl package with Anchor version 0.30.1.
  3. Notice that anchor-spl automatically upgrades solana-program to 2.0.0.
  4. Experience compilation errors.

Proposed Solution

  1. Investigate whether the anchor-spl package can maintain compatibility with solana 1.18.17.
  2. Provide clear documentation or an approach to handle scenarios where such automatic upgrades lead to compatibility issues.
  3. Possibly consider pinning or offering a version of anchor-spl that is compatible with older versions of Solana.
acheroncrypto commented 1 week ago

Thanks for creating the issue, but this is a duplicate of https://github.com/coral-xyz/anchor/issues/3044, and the problem is not anchor-spl specific.