cargo-sweep icon indicating copy to clipboard operation
cargo-sweep copied to clipboard

Doesn't clean non-workspace crates that exist inside a workspace

Open bes opened this issue 2 years ago • 0 comments

I have a git with the following layout

.
├── Cargo.toml
├── app-wasm
│  ├── Cargo.toml
├── cli
│  ├── Cargo.toml
├── crates
│  ├── api
│  │  ├── Cargo.toml
│  ├── models
│  │  ├── Cargo.toml
...

Where the top-level Cargo.toml looks like:

[workspace]
members = [
    "crates/*",
]
exclude = [
    "cli",
    "app-wasm",
]

Where cli and app-wasm are standalone applications that use the workspace crates.

I used the following commands:

  • After rustup update: cargo sweep -r --toolchains="stable" "$HOME/repos/"
  • As well as cargo sweep -r -t 0 "$HOME/repos/"

Actual:

  • Did not clean the incremental folder from the top-level workspace target folder.
  • Did not clean any artifacts from cli or app-wasm.

Expected:

  • All targets properly cleaned.

I am willing to work on a PR if this can be confirmed to be a bug.

Thanks!

bes avatar Apr 12 '22 11:04 bes