Hey, I am trying to contribute to Roc and going through the Roc internals to get more familiar with it.
Currently, just running cargo test --release
on the main branch fails
test result: FAILED. 133 passed; 10 failed; 2 ignored; 0 measured; 0 filtered out; finished in 50.56s
failures:
tests::interpolation_with_nested_strings
tests::list_contains
tests::list_drop_at_negative_index
tests::list_first
tests::list_get_negative_index
tests::list_last
tests::list_sum_empty
tests::list_sum_frac
tests::list_sum_num
tests::opaque_wrap_function
Can please some one give an advice on what I am doing wrong here? Are we not supposed to work with the main branch for contributions?
Happy to provide more details here if needed.
Thanks!
Hi @Sajjad Naveed,
Yeah, the main branch is the right place.
Perhaps there is something wrong with your dependencies, are you using nix develop
?
If you share an error message of any of those failures I will probably know what's wrong
Yeah I am. The only difference is that I am using Determinate Systems nix installer rather than the official one but it hasn't caused any issues before.
If you scroll up a bit you will probably have a full error/failure message for each test
Here's one of the failure messages.
test tests::list_sum_frac ... FAILED
ld: invalid r_symbolnum=1 in '/private/tmp/nix-shell.YiDFvR/.tmpI1Go9y/app.o'
/tmp/nix-shell.YiDFvR/.tmpI1Go9y/app.dylib: No such file or directory
thread 'main' panicked at crates/repl_cli/src/cli_gen.rs:69:14:
we produce a valid Dylib: DlOpen { desc: "dlopen(/tmp/nix-shell.YiDFvR/.tmpI1Go9y/app.dylib, 0x0005): tried: \'/tmp/nix-shell.YiDFvR/.tmpI1Go9y/app.dylib\' (no such file), \'/System/Volumes/Preboot/Cryptexes/OS/tmp/nix-shell.YiDFvR/.tmpI1Go9y/app.dylib\' (no such file), \'/tmp/nix-shell.YiDFvR/.tmpI1Go9y/app.dylib\' (no such file), \'/private/tmp/nix-shell.YiDFvR/.tmpI1Go9y/app.dylib\' (no such file), \'/System/Volumes/Preboot/Cryptexes/OS/private/tmp/nix-shell.YiDFvR/.tmpI1Go9y/app.dylib\' (no such file), \'/private/tmp/nix-shell.YiDFvR/.tmpI1Go9y/app.dylib\' (no such file)" }
I hope this helps!?!
Hmm some settings in the Determinate Systems nix installer could be the problem here. What operating system and architecture(x64, apple silicon...) is your machine?
Macbook Pro (M1 Max)
MacOS 15.0 (24A335)
Yeah, we don't test with macos 15 yet, that could also be the problem
Hmm, do you think it's worth trying the official installer?
Actually, I now think xcode problems could be more likely, can you try this?
I have to go now, but I'll be back tomorrow if you need more help :)
Trying. I will let you know how it goes.
Yeah I understand. Take Care. It's 4:03 am here as well. I am also gonna crash after this.
It worked :dancing:
Thanks for helping @Anton
This should be pinned in contributions somehow, as there is a reasonable chance other people might face this too.
But thank you so much again :praise:
Sajjad Naveed has marked this topic as resolved.
This should be pinned in contributions somehow, as there is a reasonable chance other people might face this too.
I'll modify the error message, that way it's right there :)
https://github.com/roc-lang/roc/pull/7137
I'm also running into some failing tests on main running locally on my mac (with nix). Any suggestions about fixing these?
failures:
---- tests::identity_lambda stdout ----
thread 'tests::identity_lambda' panicked at crates/repl_test/src/cli.rs:96:13:
repl exited unexpectedly before finishing evaluation. Exit status was ExitStatus(unix_wait_status(25856)) and stderr was ""
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- tests::issue_2300 stdout ----
thread 'tests::issue_2300' panicked at crates/repl_test/src/cli.rs:96:13:
repl exited unexpectedly before finishing evaluation. Exit status was ExitStatus(unix_wait_status(25856)) and stderr was ""
---- tests::issue_2582_specialize_result_value stdout ----
thread 'tests::issue_2582_specialize_result_value' panicked at crates/repl_test/src/cli.rs:96:13:
repl exited unexpectedly before finishing evaluation. Exit status was ExitStatus(unix_wait_status(25856)) and stderr was ""
---- tests::sum_lambda stdout ----
thread 'tests::sum_lambda' panicked at crates/repl_test/src/cli.rs:96:13:
repl exited unexpectedly before finishing evaluation. Exit status was ExitStatus(unix_wait_status(25856)) and stderr was ""
failures:
tests::identity_lambda
tests::issue_2300
tests::issue_2582_specialize_result_value
tests::sum_lambda
I’m also using the determinate systems nix installer. I ran into the issue above and was able to fix it with the given solution. So maybe this is related to that also?
@Isaac Van Doren these are known failures on debug build, they work on --release
So I'd recommend cargo test --release
for now
Perfect, thanks!
Maybe we should ignore those in debug builds so people don't hit this?
https://github.com/roc-lang/roc/pull/7210
Last updated: Jul 06 2025 at 12:14 UTC