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

better error message if toolchain specified in Anchor.toml isn't installed #3147

Closed
jim4067 opened this issue Aug 3, 2024 · 3 comments
Closed
Labels

Comments

@jim4067
Copy link
Contributor

jim4067 commented Aug 3, 2024

When running solana 1.18.8 and I specify 1.18.20 in the toolchain section of my Anchor.toml, it errors out with this cryptic message

thread 'main' panicked at cli/src/lib.rs:545:18:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

It would be better if an error message like specifid toochain unavailable locally and give the user the option to install it

@acheroncrypto
Copy link
Collaborator

This should already work if you specify the version correctly (without spaces or unsupported characters). Can you show the [toolchain] section of your Anchor.toml?

@jim4067
Copy link
Contributor Author

jim4067 commented Aug 4, 2024

Can you show the [toolchain] section of your Anchor.toml

[toolchain]
anchor_version = "0.30.1"  
solana_version = "1.18.20"  

steps to reproduce.

  1. switch to 1.18.8
  2. try running anchor build

@acheroncrypto
Copy link
Collaborator

The issue is solana-install >1.18.19 logs:

⚠️  solana-install is deprecated and will be discontinued when v1.18 is no longer supported. Please switch to Agave: https://github.com/anza-xyz/agave/wiki/Agave-Transition

solana-labs/solana@526b7fa

which makes parsing the version fail.

We'll migrate to the new one for the next version, but you can use any version before 1.18.19 (1.18.17 is recommended).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants