-Subproject commit de700414aab1aaa4461618ce7a516cb24a8e6665
+Subproject commit add50d98e97ef30e7264ae70b83cf5ddedbf4450
let opts = registry.query(curr.get_name());
- assert!(!resolve.contains_key_equiv(&curr.get_name()), "already traversed {}", curr.get_name());
+ //assert!(!resolve.contains_key_equiv(&curr.get_name()), "already traversed {}", curr.get_name());
// Temporary, but we must have exactly one option to satisfy the dep
assert!(opts.len() == 1, "invalid num of results {}", opts.len());
trait RepresentsFlags : FlagConfig + Decodable<FlagDecoder, HammerError> {}
impl<T: FlagConfig + Decodable<FlagDecoder, HammerError>> RepresentsFlags for T {}
-trait RepresentsJSON : Decodable<json::Decoder, json::Error> {}
-impl <T: Decodable<json::Decoder, json::Error>> RepresentsJSON for T {}
+trait RepresentsJSON : Decodable<json::Decoder, json::DecoderError> {}
+impl <T: Decodable<json::Decoder, json::DecoderError>> RepresentsJSON for T {}
#[deriving(Decodable)]
pub struct NoFlags;
let json = try!(json::from_str(input).to_cargo_error(format!("Cannot parse json: {}", input), 1));
let mut decoder = json::Decoder::new(json);
- Decodable::decode(&mut decoder).to_cargo_error(|e: json::Error| format!("{}", e), 1)
+ Decodable::decode(&mut decoder).to_cargo_error(|e: json::DecoderError| format!("{}", e), 1)
}
use core::source::Source;
use core::dependency::Dependency;
use sources::path::PathSource;
+use ops::cargo_rustc;
use {CargoError,ToCargoError,CargoResult};
#[deriving(Decodable)]
let packages = try!(source.get(names.as_slice()));
let registry = PackageSet::new(packages.as_slice());
- let resolved = resolve(deps.as_slice(), ®istry);
+ let resolved = try!(resolve(deps.as_slice(), ®istry));
+
+ cargo_rustc::compile(&resolved);
Ok(())
//call_rustc(~BufReader::new(manifest_bytes.as_slice()))
pub fn compile(pkgs: &core::PackageSet) {
let sorted = match pkgs.sort() {
Some(pkgs) => pkgs,
- None => return
+ None => fail!("Could not perform topsort on PackageSet")
};
for pkg in sorted.iter() {
fn compile_pkg(pkg: &core::Package, pkgs: &core::PackageSet) {
// Build up the destination
- let src = pkg.get_root().join(Path::new(pkg.get_source().name.as_slice()));
+ let src = pkg.get_root().join(Path::new(pkg.get_source().path.as_slice()));
let target = pkg.get_root().join(Path::new(pkg.get_target()));
// First ensure that the directory exists
use std::os;
use std::path::Path;
use std::io;
-use std::io::process::{Process,ProcessConfig,ProcessOutput};
+use std::io::process::{Process,ProcessConfig,ProcessOutput,InheritFd};
use ToCargoError;
use CargoResult;
self
}
+ // TODO: clean all this up
pub fn exec(&self) -> io::IoResult<()> {
let mut config = ProcessConfig::new();
config.program = self.program.as_slice();
config.args = self.args.as_slice();
config.cwd = Some(&self.cwd);
+ config.stdout = InheritFd(1);
+ config.stderr = InheritFd(2);
let mut process = try!(Process::configure(config));
let exit = process.wait();