Skip to content

Commit

Permalink
Fix "Fresh" display with doctest units.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jun 28, 2018
1 parent 812fba6 commit 478d1ce
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/cargo/core/compiler/job_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,6 @@ impl<'a> JobQueue<'a> {
) -> CargoResult<()> {
if (self.compiled.contains(key.pkg) && !key.mode.is_doc())
|| (self.documented.contains(key.pkg) && key.mode.is_doc())
// Skip doctest, it is a dummy entry that is always fresh.
|| key.mode == CompileMode::Doctest
{
return Ok(());
}
Expand All @@ -421,8 +419,11 @@ impl<'a> JobQueue<'a> {
// being a compiled package
Dirty => {
if key.mode.is_doc() {
self.documented.insert(key.pkg);
config.shell().status("Documenting", key.pkg)?;
// Skip Doctest
if !key.mode.is_any_test() {
self.documented.insert(key.pkg);
config.shell().status("Documenting", key.pkg)?;
}
} else {
self.compiled.insert(key.pkg);
if key.mode.is_check() {
Expand All @@ -432,11 +433,15 @@ impl<'a> JobQueue<'a> {
}
}
}
Fresh if self.counts[key.pkg] == 0 => {
self.compiled.insert(key.pkg);
config.shell().verbose(|c| c.status("Fresh", key.pkg))?;
Fresh => {
// If doctest is last, only print "Fresh" if nothing has been printed.
if self.counts[key.pkg] == 0
&& !(key.mode == CompileMode::Doctest && self.compiled.contains(key.pkg))
{
self.compiled.insert(key.pkg);
config.shell().verbose(|c| c.status("Fresh", key.pkg))?;
}
}
Fresh => {}
}
Ok(())
}
Expand Down

0 comments on commit 478d1ce

Please sign in to comment.