coconut-svsm / svsm

COCONUT-SVSM
MIT License
122 stars 42 forks source link

`make clippy` fails with latest changes #521

Closed tylerfanelli closed 6 days ago

tylerfanelli commented 6 days ago

It seems that cargo clippy on the kernel module fails now due to the packit dependency. Curious, as there is an --exclude packit line in make clippy, but I assume this does not apply to clippy applied to the kernel module.

$ make clippy
cargo clippy --workspace --all-features --exclude packit --exclude svsm-fuzz --exclude igvmbuilder --exclude igvmmeasure -- -D warnings
error: failed to load manifest for workspace member `svsm/svsm/kernel`
referenced by workspace at `svsm/svsm/Cargo.toml`

Caused by:
  failed to load manifest for dependency `packit`

Caused by:
  failed to read `svsm/svsm/packit/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
make: *** [Makefile:178: clippy] Error 101
stefano-garzarella commented 6 days ago

Yesterday we merged 2 PRs that changed couple of submodules (packit was part of it), so I guess that could be the issue. See https://mail.8bytes.org/pipermail/svsm-devel/2024-November/000406.html

So when updating to latest HEAD please make sure to update your submodules as documented in PR #514:

  # clean all generated files to avoid having folders with left-overs
  git clean -xfd
  git submodule foreach --recursive git clean -xfd

  # sync urls and update/init git submodules
  git submodule sync
  git submodule update --init

The libmstpm/ directory might remain after this and can be safely deleted.

tylerfanelli commented 6 days ago

Thanks! Worked for me :)