More log output
authorCarl Lerche <me@carllerche.com>
Thu, 22 May 2014 21:50:11 +0000 (14:50 -0700)
committerCarl Lerche <me@carllerche.com>
Tue, 27 May 2014 22:58:37 +0000 (15:58 -0700)
src/cargo/core/manifest.rs
src/cargo/ops/cargo_compile.rs
src/cargo/ops/cargo_rustc.rs

index 34f11fe0d4c2332e4040c94d1fbb78eec02877ed..cb188e1cdf1676955dd3ec6cc9bdd2e31d8bccb2 100644 (file)
@@ -194,6 +194,10 @@ impl TomlManifest {
         // Get targets
         let targets = normalize(&self.lib, &self.bin);
 
+        if targets.is_empty() {
+            debug!("manifest has no build targets; project={}", self.project);
+        }
+
         let mut deps = Vec::new();
 
         // Collect the deps
index a01004d0cc7be8beecc1fa681519688b51cb7fdf..3d09850c2f3506e5cb0469e0fe3e1874db27e8e0 100644 (file)
@@ -26,10 +26,16 @@ use util::{other_error, CargoResult, Wrap};
 pub fn compile(manifest_path: &str) -> CargoResult<()> {
     log!(4, "compile; manifest-path={}", manifest_path);
 
-    let root_dep = try!(ops::read_manifest(manifest_path)).to_dependency();
+    let manifest = try!(ops::read_manifest(manifest_path));
+
+    debug!("loaded manifest; manifest={}", manifest);
+
+    let root_dep = manifest.to_dependency();
 
     let configs = try!(config::all_configs(os::getcwd()));
 
+    debug!("loaded config; configs={}", configs);
+
     let config_paths = configs.find_equiv(&"paths").map(|v| v.clone()).unwrap_or_else(|| ConfigValue::new());
 
     let mut paths: Vec<Path> = match config_paths.get_value() {
index 2629cb2c5c31d773dcebff7a9ec8ab8b9a940978..dbd2441b152d6f62629035068f758f3c3519ff7f 100644 (file)
@@ -10,6 +10,8 @@ use util::result::ProcessError;
 type Args = Vec<String>;
 
 pub fn compile_packages(pkgs: &core::PackageSet) -> CargoResult<()> {
+    debug!("compiling; pkgs={}", pkgs);
+
     let mut sorted = match pkgs.sort() {
         Some(pkgs) => pkgs,
         None => return Err(other_error("circular dependency detected"))
@@ -29,10 +31,13 @@ pub fn compile_packages(pkgs: &core::PackageSet) -> CargoResult<()> {
 }
 
 fn compile_pkg<T>(pkg: &core::Package, pkgs: &core::PackageSet, exec: |&ProcessBuilder| -> CargoResult<T>) -> CargoResult<()> {
+    debug!("compiling; pkg={}; targets={}; deps={}", pkg, pkg.get_targets(), pkg.get_dependencies());
     // Build up the destination
     // let src = pkg.get_root().join(Path::new(pkg.get_source().path.as_slice()));
     let target_dir = pkg.get_absolute_target_dir();
 
+    debug!("creating target dir; path={}", target_dir.display());
+
     // First ensure that the directory exists
     try!(mk_target(&target_dir).map_err(|_| other_error("could not create target directory")));