massalabs / massa

The Decentralized and Scaled Blockchain
https://massa.net
5.57k stars 713 forks source link

Improve `check` job in CI #3574

Open aoudiamoncef opened 1 year ago

aoudiamoncef commented 1 year ago

Actual Use cargo check

cargo check

result:

➜  massa git:(testnet_20) cargo check
warning: /Users/aoudiamoncef/Workspace/massa/massa-node/Cargo.toml: unused manifest key: build
    Finished dev [unoptimized + debuginfo] target(s) in 0.40s

Use cargo hack to run deeper checks.

Expected

cargo hack check --all --ignore-private --each-feature

result:

info: running `cargo check --no-default-features --features benchmarking` on massa_execution_worker (70/88)
warning: /Users/aoudiamoncef/Workspace/massa/massa-node/Cargo.toml: unused manifest key: build
  ...

warning: external crate `criterion` unused in `massa_execution_worker`: remove the dependency or add `use criterion as _;`
  --> massa-execution-worker/src/lib.rs:3:1
   |
3  | //! # General description
   | ^
   |
note: the lint level is defined here
  --> massa-execution-worker/src/lib.rs:80:9
   |
80 | #![warn(unused_crate_dependencies)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0599]: no function or associated item named `default` found for struct `ExecutionConfig` in the current scope
  --> massa-execution-worker/src/interface_impl.rs:75:39
   |
75 |         let config = ExecutionConfig::default();
   |                                       ^^^^^^^ function or associated item not found in `ExecutionConfig`

error[E0599]: no function or associated item named `sample` found for struct `LedgerConfig` in the current scope
   --> massa-execution-worker/src/tests/mock.rs:107:60
    |
107 |     let (ledger_config, tempfile, tempdir) = LedgerConfig::sample(&ledger);
    |                                                            ^^^^^^ function or associated item not found in `LedgerConfig`

error[E0599]: no function or associated item named `default` found for struct `FinalStateConfig` in the current scope
   --> massa-execution-worker/src/tests/mock.rs:110:44
    |
110 |     let default_config = FinalStateConfig::default();
    |                                            ^^^^^^^ function or associated item not found in `FinalStateConfig`

error[E0599]: no function or associated item named `default` found for struct `SelectorConfig` in the current scope
   --> massa-execution-worker/src/tests/mock.rs:122:74
    |
122 |     let (_, selector_controller) = start_selector_worker(SelectorConfig::default())
    |                                                                          ^^^^^^^ function or associated item not found in `SelectorConfig`

For more information about this error, try `rustc --explain E0599`.
warning: `massa_execution_worker` (lib) generated 1 warning
error: could not compile `massa_execution_worker` due to 4 previous errors; 1 warning emitted
error: process didn't exit successfully: `/Users/aoudiamoncef/.rustup/toolchains/nightly-2023-02-14-aarch64-apple-darwin/bin/cargo check --manifest-path massa-execution-worker/Cargo.toml --no-default-features --features benchmarking` (exit status: 101)
aoudiamoncef commented 1 year ago

cc @Ben-PH