diff --git a/Cargo.lock b/Cargo.lock index b0819a0..fc69eb1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -210,6 +210,10 @@ dependencies = [ "foldhash", ] +[[package]] +name = "hbbytecode" +version = "0.1.0" + [[package]] name = "hbbytecode" version = "0.1.0" @@ -218,20 +222,26 @@ source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#248bdf003aa991f4bad [[package]] name = "hblang" version = "0.1.0" -source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#248bdf003aa991f4bad18ddcb084532d1bcb78d5" dependencies = [ "hashbrown", - "hbbytecode", - "hbvm", + "hbbytecode 0.1.0", + "hbvm 0.1.0", "log", ] +[[package]] +name = "hbvm" +version = "0.1.0" +dependencies = [ + "hbbytecode 0.1.0", +] + [[package]] name = "hbvm" version = "0.1.0" source = "git+https://git.ablecorp.us/AbleOS/holey-bytes.git#248bdf003aa991f4bad18ddcb084532d1bcb78d5" dependencies = [ - "hbbytecode", + "hbbytecode 0.1.0 (git+https://git.ablecorp.us/AbleOS/holey-bytes.git)", ] [[package]] @@ -391,7 +401,7 @@ dependencies = [ "crossbeam-queue", "derive_more", "hashbrown", - "hbvm", + "hbvm 0.1.0 (git+https://git.ablecorp.us/AbleOS/holey-bytes.git)", "ktest_macro", "limine", "log", diff --git a/repbuild/src/dev.rs b/repbuild/src/dev.rs index 2f0a95a..3754b59 100644 --- a/repbuild/src/dev.rs +++ b/repbuild/src/dev.rs @@ -109,7 +109,7 @@ impl Package { std::fs::write(format!("target/programs/{}.hbf", self.name), &out)?; out.clear(); - hblang::run_compiler( + let err = hblang::run_compiler( &path, Options { resolver: Some(hblang::ABLEOS_PATH_RESOLVER), @@ -119,9 +119,10 @@ impl Package { }, out, &mut warnings, - )?; + ); std::fs::write(format!("target/programs/{}.hba", self.name), &out)?; out.clear(); + return err; } Ok(()) } diff --git a/repbuild/src/main.rs b/repbuild/src/main.rs index 239bf35..cdd6b15 100644 --- a/repbuild/src/main.rs +++ b/repbuild/src/main.rs @@ -253,10 +253,10 @@ TERM_BACKDROP={} ); match p.build(&mut out) { Ok(()) => {} - Err(_) => { - writeln!(errors, "========= while compiling {} =========", path) + Err(e) => { + writeln!(errors, "========= while compiling {} {} =========", path, e) .unwrap(); - errors.push_str(core::str::from_utf8(&out).expect("no")); + errors.push_str(&String::from_utf8_lossy(&out)); out.clear(); } }