You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Solana Client fails to build due to a dependency issue with spl-token-2022 v3.0.2.
It appears that this dependency has been left behind and is currently breaking the application.
Reproducible Cargo File:
[package]
name = "networking"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
tokio = { version = "1.37.0", features = ["full"] }
tokio-tungstenite = { version = "0.21.0", features = ["native-tls"] }
serde = { version = "1.0.203", features = ["derive"] }
serde_json = "1.0.117"
futures-util = { version = "0.3.30" }
solana-client = "2.0.1"
async-trait = "0.1.80"
log = "0.4.21"
reqwest = { version = "0.12.4", features = ['json'] }
serde_urlencoded = "0.7.1"
rust_decimal = "1.35.0"
Error examples:
error[E0308]: mismatched types
--> /Users/jamesmallon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/spl-token-2022-3.0.2/src/extension/confidential_transfer/instruction.rs:784:27
|
784 | instructions.push(verify_pubkey_validity(None, proof_data));
| ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Instruction`, found a different `Instruction`
| |
| arguments to this method are incorrect
|
= note: `Instruction` and `Instruction` have similar names, but are actually distinct types
note: `Instruction` is defined in crate `solana_program`
--> /Users/jamesmallon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/solana-program-1.18.17/src/instruction.rs:329:1
|
329 | pub struct Instruction {
| ^^^^^^^^^^^^^^^^^^^^^^
note: `Instruction` is defined in crate `solana_program`
--> /Users/jamesmallon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/solana-program-2.0.1/src/instruction.rs:332:1
|
332 | pub struct Instruction {
| ^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `solana_program` are being used?
note: method defined here
--> /Users/jamesmallon/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:1993:12
|
1993 | pub fn push(&mut self, value: T) {
| ^^^^
error[E0308]: mismatched types
--> /Users/jamesmallon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/spl-token-2022-3.0.2/src/extension/confidential_transfer/instruction.rs:1204:27
|
1204 | instructions.push(verify_transfer_with_fee(None, proof_data));
| ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Instruction`, found a different `Instruction`
| |
| arguments to this method are incorrect
|
= note: `Instruction` and `Instruction` have similar names, but are actually distinct types
note: `Instruction` is defined in crate `solana_program`
--> /Users/jamesmallon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/solana-program-1.18.17/src/instruction.rs:329:1
|
329 | pub struct Instruction {
| ^^^^^^^^^^^^^^^^^^^^^^
note: `Instruction` is defined in crate `solana_program`
--> /Users/jamesmallon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/solana-program-2.0.1/src/instruction.rs:332:1
|
332 | pub struct Instruction {
| ^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `solana_program` are being used?
note: method defined here
--> /Users/jamesmallon/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:1993:12
|
1993 | pub fn push(&mut self, value: T) {
| ^^^^
Proposed Solution
Bring solana-client up to speed with the rest of the upgraded crates.
The text was updated successfully, but these errors were encountered:
The crates are all up to speed, but most likely your Cargo.lock is using two different versions of solana-program. You can either edit the lockfile by hand to remove entries of solana-program 1.18.X, or clear your lockfile and regenerate it with updated dependencies.
If you create a new project with the Cargo.toml you've provided, the build will actually succeed!
Problem
Rust Version: 1.79.0
IDE: Rust Rover
Affected Crate: solana-client
Affected Crate Version: 2.0.1
Solana Client fails to build due to a dependency issue with spl-token-2022 v3.0.2.
It appears that this dependency has been left behind and is currently breaking the application.
Reproducible Cargo File:
Error examples:
Proposed Solution
Bring solana-client up to speed with the rest of the upgraded crates.
The text was updated successfully, but these errors were encountered: