all-things-risingwave

Why does 'cargo build' work but 'cargo check' gives errors?

Yue encountered errors when running 'cargo check' after 'cargo build'. The errors are related to unresolved imports. Alex Chi suggested using 'cargo build' or 'cargo clean + cargo check'. Why does 'cargo build' work but 'cargo check' gives errors?

Yu

Yue

Asked on Sep 08, 2022

  • Running 'cargo build' and 'cargo check' can produce different results because they operate under different configurations.
  • 'cargo build' builds the project and generates the executable, while 'cargo check' only checks the project for errors without generating the executable.
  • It is recommended to use 'cargo build' or 'cargo clean + cargo check' to ensure a successful build and check process.
Sep 08, 2022Edited by