Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --clean-per-run flag #49

Merged
merged 4 commits into from
Jul 11, 2020
Merged

Add --clean-per-run flag #49

merged 4 commits into from
Jul 11, 2020

Conversation

taiki-e
Copy link
Owner

@taiki-e taiki-e commented Jun 22, 2020

--clean-per-run
    Remove artifacts for that package before running the command.
    
    If used this flag with --workspace, --each-feature, or --feature-powerset, 
    artifacts will be removed before each run.

    Note that dependencies artifacts will be preserved.

Closes #47

cc @Nemo157

@taiki-e
Copy link
Owner Author

taiki-e commented Jun 22, 2020

Given that cargo clean -p had a lot of bugs until recently, you probably need a beta or nightly compiler for this to work as expected. (rust-lang/cargo#8210)
However, it doesn't rely on unstable features, so it should be available at 1.45.

src/cli.rs Show resolved Hide resolved
Comment on lines +213 to +216
if args.verbose {
// running `cargo clean --package <package>`
info!(args.color, "running {}", line);
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't display by default, but it's probably fine. (displayed when you pass the -v flag.)

@taiki-e
Copy link
Owner Author

taiki-e commented Jul 11, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 11, 2020

Build succeeded:

@bors bors bot merged commit 5d3278d into master Jul 11, 2020
@bors bors bot deleted the clean-per-run branch July 11, 2020 20:38
@taiki-e taiki-e added the C-enhancement Category: A new feature or an improvement for an existing one label Oct 10, 2020
@taiki-e taiki-e removed the C-enhancement Category: A new feature or an improvement for an existing one label Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to clean between each run
2 participants