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

Don't fetch all crates on clean #2704

Merged
merged 1 commit into from
Jun 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/cargo/ops/cargo_clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::fs;
use std::path::Path;

use core::{Package, Profiles};
use core::registry::PackageRegistry;
use util::{CargoResult, human, ChainError, Config};
use ops::{self, Layout, Context, BuildConfig, Kind, Unit};

Expand All @@ -28,7 +29,9 @@ pub fn clean(manifest_path: &Path, opts: &CleanOptions) -> CargoResult<()> {
return rm_rf(&target_dir);
}

let (resolve, packages) = try!(ops::fetch(manifest_path, opts.config));
let mut registry = PackageRegistry::new(opts.config);
let resolve = try!(ops::resolve_pkg(&mut registry, &root, opts.config));
let packages = ops::get_resolved_packages(&resolve, registry);

let dest = if opts.release {"release"} else {"debug"};
let host_layout = try!(Layout::new(opts.config, &root, None, dest));
Expand Down