I'm attempting to spin up ic-repl to troubleshoot a misbehaving wallet canister. (I'm not a rust developer, so please excuse my ignorance. Unfortunately, dfx has left me up sh*tcreek, so diving into some rust seems to be my only option 🤣!) Perhaps I have the wrong version of a dependency? I know the Dfinity libs are all changing very frequently.
base ❯ cargo install --path .
Installing ic-repl v0.1.0 (/Users/me/Projects/ic-repl)
Updating crates.io index
Updating git repository `https://github.com/dfinity/candid.git`
Compiling ic-repl v0.1.0 (/Users/me/Projects/ic-repl)
error[E0308]: mismatched types
--> src/command.rs:124:61
|
124 | helper.env.0.insert(id, IDLValue::Principal(sender));
| ^^^^^^ expected struct `candid::Principal`, found struct `ic_agent::export::Principal`
|
= note: perhaps two different versions of crate `ic_types` are being used?
error[E0308]: mismatched types
--> src/exp.rs:315:20
|
315 | .query(canister_id, method)
| ^^^^^^^^^^^ expected struct `ic_agent::export::Principal`, found struct `candid::Principal`
|
= note: expected reference `&ic_agent::export::Principal`
found reference `&candid::Principal`
= note: perhaps two different versions of crate `ic_types` are being used?
note: return type inferred to be `&ic_agent::export::Principal` here
--> src/exp.rs:312:24
|
312 | let effective_id = get_effective_canister_id(canister_id.clone(), method, args)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> src/exp.rs:317:41
|
317 | .with_effective_canister_id(effective_id)
| ^^^^^^^^^^^^ expected struct `ic_agent::export::Principal`, found struct `candid::Principal`
|
= note: perhaps two different versions of crate `ic_types` are being used?
note: return type inferred to be `ic_agent::export::Principal` here
--> src/exp.rs:312:24
|
312 | let effective_id = get_effective_canister_id(canister_id.clone(), method, args)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> src/exp.rs:326:21
|
326 | .update(canister_id, method)
| ^^^^^^^^^^^ expected struct `ic_agent::export::Principal`, found struct `candid::Principal`
|
= note: expected reference `&ic_agent::export::Principal`
found reference `&candid::Principal`
= note: perhaps two different versions of crate `ic_types` are being used?
note: return type inferred to be `&ic_agent::export::Principal` here
--> src/exp.rs:312:24
|
312 | let effective_id = get_effective_canister_id(canister_id.clone(), method, args)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> src/exp.rs:328:41
|
328 | .with_effective_canister_id(effective_id)
| ^^^^^^^^^^^^ expected struct `ic_agent::export::Principal`, found struct `candid::Principal`
|
= note: perhaps two different versions of crate `ic_types` are being used?
note: return type inferred to be `ic_agent::export::Principal` here
--> src/exp.rs:312:24
|
312 | let effective_id = get_effective_canister_id(canister_id.clone(), method, args)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> src/helper.rs:372:16
|
372 | .query(canister_id, "__get_candid_interface_tmp_hack")
| ^^^^^^^^^^^ expected struct `ic_agent::export::Principal`, found struct `candid::Principal`
|
= note: expected reference `&ic_agent::export::Principal`
found reference `&candid::Principal`
= note: perhaps two different versions of crate `ic_types` are being used?
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0308`.
error: failed to compile `ic-repl v0.1.0 (/Users/me/Projects/ic-repl)`, intermediate artifacts can be found at `/Users/me/Projects/ic-repl/target`
Caused by:
could not compile `ic-repl`
I'm attempting to spin up ic-repl to troubleshoot a misbehaving wallet canister. (I'm not a rust developer, so please excuse my ignorance. Unfortunately,
dfx
has left me up sh*tcreek, so diving into some rust seems to be my only option 🤣!) Perhaps I have the wrong version of a dependency? I know the Dfinity libs are all changing very frequently.