Closed kmaus-near closed 2 months ago
Seems the action cannot pick up some rust crates, I have been testing this action locally with a tool called act
if you would like to check it out.
@kmaus-near can you please specify what errors you are getting? Are they happening when you are trying to build the contract?
@kmaus-near can you please specify what errors you are getting? Are they happening when you are trying to build the contract?
Yes! This is a bit long for a PR, but this happens on the cargo build --target wasm32-unknown-unknown --release ;
step. I'm not sure if it's an issue with the container that runs this locally or an actual cargo issue.
| error[E0463]: can't find crate for `core`
| |
| = note: the `wasm32-unknown-unknown` target may not be installed
| = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`
|
| error[E0463]: can't find crate for `compiler_builtins`
|
| error[E0463]: can't find crate for `core`
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/itoa-1.0.10/src/lib.rs:46:5
| |
| 46 | use core::mem::{self, MaybeUninit};
| | ^^^^ can't find crate
| |
| = note: the `wasm32-unknown-unknown` target may not be installed
| = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`
|
| error[E0463]: can't find crate for `core`
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/itoa-1.0.10/src/lib.rs:47:5
| |
| 47 | use core::{ptr, slice, str};
| | ^^^^ can't find crate
| |
| = note: the `wasm32-unknown-unknown` target may not be installed
| = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`
|
| error: cannot find macro `debug_assert_eq` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/itoa-1.0.10/src/udiv128.rs:44:5
| |
| 44 | debug_assert_eq!(quot, n / d as u128);
| | ^^^^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert_eq` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/itoa-1.0.10/src/udiv128.rs:45:5
| |
| 45 | debug_assert_eq!(rem as u128, n % d as u128);
| | ^^^^^^^^^^^^^^^
|
| error[E0405]: cannot find trait `Default` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/itoa-1.0.10/src/lib.rs:65:6
| |
| 65 | impl Default for Buffer {
| | ^^^^^^^ not found in this scope
|
| error[E0405]: cannot find trait `Copy` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/itoa-1.0.10/src/lib.rs:72:6
| |
| 72 | impl Copy for Buffer {}
| | ^^^^ not found in this scope
|
| error[E0405]: cannot find trait `Clone` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/itoa-1.0.10/src/lib.rs:74:6
| |
| 74 | impl Clone for Buffer {
| | ^^^^^ not found in this scope
|
| error[E0405]: cannot find trait `Copy` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/itoa-1.0.10/src/lib.rs:110:23
| |
| 110 | pub trait Sealed: Copy {
| | ^^^^ not found in this scope
|
| Some errors have detailed explanations: E0405, E0463.
| For more information about an error, try `rustc --explain E0405`.
| error: could not compile `itoa` (lib) due to 10 previous errors
| warning: build failed, waiting for other jobs to finish...
| error[E0463]: can't find crate for `core`
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/buffer/mod.rs:2:5
| |
| 2 | use core::mem::MaybeUninit;
| | ^^^^ can't find crate
| |
| = note: the `wasm32-unknown-unknown` target may not be installed
| = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`
|
| error[E0463]: can't find crate for `core`
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/buffer/mod.rs:3:5
| |
| 3 | use core::{slice, str};
| | ^^^^ can't find crate
| |
| = note: the `wasm32-unknown-unknown` target may not be installed
| = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`
|
| error[E0463]: can't find crate for `core`
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/d2s.rs:27:5
| |
| 27 | use core::mem::MaybeUninit;
| | ^^^^ can't find crate
| |
| = note: the `wasm32-unknown-unknown` target may not be installed
| = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`
|
| error[E0463]: can't find crate for `core`
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/d2s_intrinsics.rs:21:5
| |
| 21 | use core::ptr;
| | ^^^^ can't find crate
| |
| = note: the `wasm32-unknown-unknown` target may not be installed
| = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`
|
| error[E0463]: can't find crate for `core`
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/pretty/exponent.rs:2:5
| |
| 2 | use core::ptr;
| | ^^^^ can't find crate
| |
| = note: the `wasm32-unknown-unknown` target may not be installed
| = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`
|
| error[E0463]: can't find crate for `core`
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/pretty/mantissa.rs:2:5
| |
| 2 | use core::ptr;
| | ^^^^ can't find crate
| |
| = note: the `wasm32-unknown-unknown` target may not be installed
| = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`
|
| error[E0463]: can't find crate for `core`
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/pretty/mod.rs:9:5
| |
| 9 | use core::ptr;
| | ^^^^ can't find crate
| |
| = note: the `wasm32-unknown-unknown` target may not be installed
| = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/pretty/mod.rs:181:5
| |
| 181 | debug_assert!(k >= -45);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/pretty/mod.rs:75:5
| |
| 75 | debug_assert!(k >= -324);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/pretty/exponent.rs:39:5
| |
| 39 | debug_assert!(k < 100);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/pretty/exponent.rs:13:5
| |
| 13 | debug_assert!(k < 1000);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/f2s_intrinsics.rs:110:9
| |
| 110 | debug_assert!(i < d2s::DOUBLE_POW5_SPLIT.len() as u32);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/f2s_intrinsics.rs:89:9
| |
| 89 | debug_assert!(q < d2s::DOUBLE_POW5_INV_SPLIT.len() as u32);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/f2s_intrinsics.rs:70:5
| |
| 70 | debug_assert!(shifted_sum <= u32::max_value() as u64);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/f2s_intrinsics.rs:59:5
| |
| 59 | debug_assert!(shift > 32);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/f2s_intrinsics.rs:30:9
| |
| 30 | debug_assert!(value != 0);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/d2s_intrinsics.rs:65:5
| |
| 65 | debug_assert!(p < 64);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/d2s_intrinsics.rs:64:5
| |
| 64 | debug_assert!(value != 0);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/d2s_intrinsics.rs:44:9
| |
| 44 | debug_assert!(value != 0);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/d2s.rs:178:21
| |
| 178 | debug_assert!(i < DOUBLE_POW5_SPLIT.len() as i32);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/d2s.rs:136:21
| |
| 136 | debug_assert!(q < DOUBLE_POW5_INV_SPLIT.len() as u32);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/d2s.rs:41:5
| |
| 41 | debug_assert!(v < 100000000000000000);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/common.rs:93:5
| |
| 93 | debug_assert!(e <= 2620);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/common.rs:92:5
| |
| 92 | debug_assert!(e >= 0);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/common.rs:84:5
| |
| 84 | debug_assert!(e <= 1650);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/common.rs:83:5
| |
| 83 | debug_assert!(e >= 0);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/common.rs:69:5
| |
| 69 | debug_assert!(e <= 3528);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/common.rs:68:5
| |
| 68 | debug_assert!(e >= 0);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/common.rs:58:5
| |
| 58 | debug_assert!(e <= 3528);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/common.rs:57:5
| |
| 57 | debug_assert!(e >= 0);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/common.rs:27:5
| |
| 27 | debug_assert!(v < 1000000000);
| | ^^^^^^^^^^^^
|
| error: cannot find macro `debug_assert` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/buffer/mod.rs:75:13
| |
| 75 | debug_assert!(n <= self.bytes.len());
| | ^^^^^^^^^^^^
|
| error[E0405]: cannot find trait `Copy` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/buffer/mod.rs:82:6
| |
| 82 | impl Copy for Buffer {}
| | ^^^^ not found in this scope
|
| error[E0405]: cannot find trait `Clone` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/buffer/mod.rs:84:6
| |
| 84 | impl Clone for Buffer {
| | ^^^^^ not found in this scope
|
| error[E0405]: cannot find trait `Default` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/buffer/mod.rs:92:6
| |
| 92 | impl Default for Buffer {
| | ^^^^^^^ not found in this scope
|
| error[E0405]: cannot find trait `Copy` in this scope
| --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.16/src/buffer/mod.rs:109:19
| |
| 109 | pub trait Sealed: Copy {
| | ^^^^ not found in this scope
|
| error: could not compile `ryu` (lib) due to 38 previous errors
[Deploy Dev Smart Contract/deploy-contract] ❌ Failure - Main Cargo Build
[Deploy Dev Smart Contract/deploy-contract] exitcode '101': failure
[Deploy Dev Smart Contract/deploy-contract] 🏁 Job failed
Error: Job 'deploy-contract' failed
@kmaus-near looks like you need to add wasm Rust target on the system before building the contract.
rustup target add wasm32-unknown-unknown
Okay new error, I think this may be the JSON contract file, but correct me if I'm wrong.
|
| Deploy a contract to an existing account (optionally initializing it)
|
| Options:
| --help Show help [boolean]
| --version Show version number [boolean]
| -v, --verbose Prints out verbose output [boolean] [default: false]
| --wasmFile Path to wasm file to deploy [string] [required]
| --initFunction Initialization method [string]
| --initArgs Initialization arguments
| --initGas Gas for initialization call (default: 30TGAS) [number] [default: "1b48eb57e000"]
| --initDeposit Deposit in Ⓝ to send for initialization call (default: 0) [string] [default: "0"]
| --networkId Which network to use. Supports: mainnet, testnet, custom [string] [default: "testnet"]
| --force Forcefully deploy the contract [boolean] [default: false]
|
| SyntaxError: Expected property name or '}' in JSON at position 1 (line 1 column 2)
| at JSON.parse (<anonymous>)
| at /opt/hostedtoolcache/node/21.7.2/arm64/lib/node_modules/near-cli/node_modules/@near-js/keystores-node/lib/unencrypted_file_system_keystore.js:40:21
| at Generator.next (<anonymous>)
| at fulfilled (/opt/hostedtoolcache/node/21.7.2/arm64/lib/node_modules/near-cli/node_modules/@near-js/keystores-node/lib/unencrypted_file_system_keystore.js:5:58)
[Deploy Dev Smart Contract/deploy-contract] ❌ Failure - Main Cargo Build
[Deploy Dev Smart Contract/deploy-contract] exitcode '1': failure
[Deploy Dev Smart Contract/deploy-contract] 🏁 Job failed
Error: Job 'deploy-contract' failed
success
success
Pusher: @kmaus-near, Action: pull_request
, Working Directory: `, Workflow:
Terraform Feature Env`
URL: https://mpc-recovery-leader-dev-562-7tk2cmmtcq-ue.a.run.app
success
success
Pusher: @kmaus-near, Action: pull_request
, Working Directory: `, Workflow:
Terraform Feature Env (Destroy)`
Not sure if this is going to work first time go, so I added a workflow dispatch so we can debug issues for the contract.
My main concern for this run is if the runner will see the JSON file that gets set, but we shall see what happens.