Scout is an extensible open-source tool intended to assist Stellar Soroban smart contract developers and auditors detect common security issues and deviations from best practices.
MIT License
39
stars
3
forks
source link
No such file or directory / unresolved import #253
When executing Scout on a project that has dependencies (e.g crossed contact calls) it shows the following error:
error: No such file or directory (os error 2)
--> token_share/src/lib.rs:17:5
|
17 | / soroban_sdk::contractimport!(
18 | | file = "../target/wasm32-unknown-unknown/release/soroban_token_contract.wasm"
19 | | );
| |_____^
|
= note: this error originates in the macro `soroban_sdk::contractimport` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0432]: unresolved import `token::Client`
--> token_share/src/lib.rs:21:41
|
21 | pub use token::{self as token_contract, Client};
| ^^^^^^ no `Client` in `token`
|
= help: consider importing this struct instead:
soroban_sdk::token::Client
For more information about this error, try `rustc --explain E0432`.
error: could not compile `token_share` (lib) due to 2 previous errors
thread 'main' panicked at /home/mati/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-scout-audit-0.2.11/src/main.rs:9:62:
called `Result::unwrap()` on an `Err` value: Failed to run dylint
In order to solve this error, users should compile the whole project before running Scout.
Expected behavior
When encountering this scenario, Scout should not panic. Instead, show an appropriate error message, instructing the user to compile all contracts before proceeding with Scout execution.
Nice to have: could Scout take care of the compilation? For example, if there is a Make file in the project, prompt the user to authorize the execution of such Make file before running Scout.
When executing Scout on a project that has dependencies (e.g crossed contact calls) it shows the following error:
In order to solve this error, users should compile the whole project before running Scout.
Expected behavior
Make
file in the project, prompt the user to authorize the execution of suchMake
file before running Scout.