is there a command that runs roc test, ignoring some errors, like roc run does?
I don't think so. Though I know there was discussion about his before. I think we made a plan to add a flag, but would need to dig things up in #ideas, not sure if an issue got filed for it...
I'd like to add this feature myself (or at least try to) can you give me any pointers on where to start?
Hi @Pei Yang Ching,
Thanks for helping out!
I'd like to add this feature myself (or at least try to) can you give me any pointers on where to start?
The flag itself (e.g. --ignore-errors
) should be added in crates/cli/src/lib.rs, I also recommend checking out how ignoring errors is handled by CMD_RUN
in the same file. The cursor.sh editor can also assist you in finding stuff.
thanks for the pointers! I created a draft PR here: https://github.com/roc-lang/roc/pull/6623
but I couldn't build roc for some reason, neither cargo build
nor nix build
works, I'm using nix on MacOS (x86_64), someone knows something,
logs: https://pastebin.com/KR3t3ES0
It seems like it couldn't link against c++ stdlib and llvm libs for some reason?
I usually use nix develop
followed by cargo build --release --bin roc
, can you try that?
hey @Anton ! After a bit of digging around, this patch seems to have fixed the issue:
diff --git a/crates/cli/build.rs b/crates/cli/build.rs
index 5d171b71c..1adcd79a4 100644
--- a/crates/cli/build.rs
+++ b/crates/cli/build.rs
@@ -1,6 +1,6 @@
fn main() {
// workaround for issue https://github.com/NixOS/nixpkgs/issues/166205 . This println can be removed when this issue is fixed. Upgrading to LLVM 14 could also fix this iss
ue.
// also see https://github.com/NixOS/nixpkgs/pull/181485
- #[cfg(all(target_os = "macos", target_arch = "aarch64"))]
- println!("cargo:rustc-link-lib=c++abi")
+ #[cfg(all(target_os = "macos"))]
+ println!("cargo:rustc-link-arg=-lc++abi")
}
in short, it seems this build flag, which is currently used by MacOS ARM, is also needed for x86_64 MacOS. I'd make a PR, but would like to first run this through someone familiar with the MacOS+nix side, if there's anyone like that please do let me know, thanks again :)
Looks like this has recently been fixed. I'll try updating to the latest nix in the coming days to see if we can get rid of this workaround. I'll let you know when the update is merged :)
@Pei Yang Ching, PR#6631 was merged, I was able to remove the workaround in build.rs
Last updated: Jul 06 2025 at 12:14 UTC