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

spl: Pin version of toml_edit crate to 0.21.0 #2807

Merged
merged 2 commits into from
Feb 4, 2024

Conversation

acheroncrypto
Copy link
Collaborator

Problem

New installations of anchor-spl come with toml_edit 0.21.1 which has a MSRV of 1.69 which results in the following error when using solana-cli 1.17:

error: package `toml_edit v0.21.1` cannot be built because it requires rustc 1.69 or newer, while the currently active rustc version is 1.68.0-dev

There is also no good reason for a program to depend on toml_edit crate but that's not something we have control over since it's a transitive dependency of spl-token-2022.

Related: solana-labs/solana#33504

Summary of changes

Use fixed version toml_edit = "=0.21.0" in anchor-spl to block cargo from fetching the newest version.

This is necessary until #2795 is merged but that also has its own problems.

Copy link

vercel bot commented Feb 4, 2024

@acheroncrypto is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@acheroncrypto acheroncrypto added spl dependencies Pull requests that update a dependency file labels Feb 4, 2024
@acheroncrypto acheroncrypto merged commit fde0066 into coral-xyz:master Feb 4, 2024
48 of 49 checks passed
@Dammi87
Copy link

Dammi87 commented Feb 6, 2024

Leaving this here in case somebody has this issue and is looking for a quick resolution.
I first built my program - it generated the Cargo.lock file and reported the error. In pure irritation I opened Cargo.lock file and removed the damn toml_edit 0.21.0 entry, it seems to generate the 0.19.15 entry for me so that made me think to simply remove the other one.

image

This got me passed the error and I could build just fine as before.

NOTE: This is literally my second week in Rust, I have no idea what I'm doing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file spl
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants