Open letmejustputthishere opened 10 months ago
Thanks for reporting. Will let you know when we fix it.
i guess this is related.
dfx generate
cargo build --target wasm32-unknown-unknown --release -p token_transfer_backend --locked --offline
Compiling token_transfer_backend v0.1.0 (/Users/moritz/projects/examples/rust/token_transfer/src/token_transfer_backend)
error: failed to run custom build command for `token_transfer_backend v0.1.0 (/Users/moritz/projects/examples/rust/token_transfer/src/token_transfer_backend)`
Caused by:
process didn't exit successfully: /Users/moritz/projects/examples/rust/token_transfer/target/release/build/token_transfer_backend-ba044735f0bc079b/build-script-build
(exit status: 101)
--- stderr
thread 'main' panicked at /Users/moritz/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ic-cdk-bindgen-0.1.3/src/lib.rs:63:9:
Cannot find environment variable: CANISTER_CANDID_PATH_ICRC1_LEDGER_CANISTER
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
the content of the `.env` file is as follows
DFX_VERSION='0.17.0' DFX_NETWORK='local' ICRC1_LEDGER_CANISTER_CANISTER_ID='bkyz2-fmaaa-aaaaa-qaaaq-cai' CANISTER_ID_ICRC1_LEDGER_CANISTER='bkyz2-fmaaa-aaaaa-qaaaq-cai' CANISTER_ID_icrc1_ledger_canister='bkyz2-fmaaa-aaaaa-qaaaq-cai' CANISTER_ID='bkyz2-fmaaa-aaaaa-qaaaq-cai' CANISTER_CANDID_PATH='/Users/moritz/projects/examples/rust/token_transfer/.dfx/local/canisters/icrc1_ledger_canister/icrc1_ledger_canister.did'
any news here? :)
it seems like
ic_cdk_bindgen
expects an env variable set for the candid path. if you're not building withdfx
, the env variables doens't seem to be present and therust-analyzer
VSCode plugin throws the following error: