Especially when the deps are in-tree. For example, we should be able to run cargo build script and cargo clean script to only build/clean that dependency.
I'd love to have this! This is dependent on #593 though.
I鈥檇 like to add a request for cargo clean-doc or similar, to force rebuilding documentation without rebuilding dependency libraries.
This is now done with cargo {test,build} -p
This is great: cargo clean -p projectnamehere cleans only the exe file, not the deps - so it saved me 1m23s of build time when using clippy like so
It's unfortunate that there is no cargo clean --no-deps as cargo metadata have --no-deps flag. For now, I'm using this one-liner to clean only the exec and rlib file of my workspace:
cargo clean $(cargo metadata --no-deps --format-version=1 | jq -r '["-p" + " " + .packages[].name] | join(" ")')
Most helpful comment
It's unfortunate that there is no
cargo clean --no-depsascargo metadatahave--no-depsflag. For now, I'm using this one-liner to clean only the exec and rlib file of my workspace: