about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorOliver Schneider <github35764891676564198441@oli-obk.de>2018-07-05 19:02:43 +0200
committerOliver Schneider <github35764891676564198441@oli-obk.de>2018-07-05 19:02:43 +0200
commitf1e3a5a24be0429b046726f6f945595f5513f093 (patch)
tree79fbdedcac02c921b316fde42e45e489ded03617 /src
parent82a132874070bff23fa8b372dd4702ac738be9eb (diff)
downloadrust-f1e3a5a24be0429b046726f6f945595f5513f093.tar.gz
rust-f1e3a5a24be0429b046726f6f945595f5513f093.zip
Only display difference of features, not all features
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/tool.rs26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index a85594d4d3d..ec904eb2134 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -13,6 +13,7 @@ use std::env;
 use std::iter;
 use std::path::PathBuf;
 use std::process::{Command, exit};
+use std::collections::HashSet;
 
 use Mode;
 use Compiler;
@@ -183,12 +184,29 @@ impl Step for ToolBuild {
                       typically means that something was recompiled because \
                       a transitive dependency has different features activated \
                       than in a previous build:\n");
+            println!("the following dependencies are duplicated although they \
+                      have the same features enabled:");
+            for (id, cur, prev) in &duplicates {
+                println!("  {}", id);
+                if cur.2 == prev.2 {
+                    // same features
+                    println!("    `{}` ({:?})\n    `{}` ({:?})", cur.0, cur.1, prev.0, prev.1);
+                }
+            }
+            println!("the following dependencies have different features:");
             for (id, cur, prev) in duplicates {
                 println!("  {}", id);
-                println!("    `{}` enabled features {:?} at {:?}",
-                         cur.0, cur.2, cur.1);
-                println!("    `{}` enabled features {:?} at {:?}",
-                         prev.0, prev.2, prev.1);
+                if cur.2 == prev.2 {
+                    continue;
+                }
+                let cur_features: HashSet<_> = cur.2.into_iter().collect();
+                let prev_features: HashSet<_> = prev.2.into_iter().collect();
+                let cur_extra: Vec<_> = cur_features.difference(&prev_features).collect();
+                let prev_extra: Vec<_> = prev_features.difference(&cur_features).collect();
+                println!("    `{}` additionally enabled features {:?} at {:?}",
+                         cur.0, cur_extra, cur.1);
+                println!("    `{}` additionally enabled features {:?} at {:?}",
+                         prev.0, prev_extra, prev.1);
             }
             println!("");
             panic!("tools should not compile multiple copies of the same crate");