Stream: contributing

Topic: ✔ Any advice on failing roc tests!?!


view this post on Zulip Sajjad Naveed (Oct 01 2024 at 17:42):

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!

view this post on Zulip Anton (Oct 01 2024 at 17:49):

Hi @Sajjad Naveed,
Yeah, the main branch is the right place.
Perhaps there is something wrong with your dependencies, are you using nix develop?

view this post on Zulip Anton (Oct 01 2024 at 17:50):

If you share an error message of any of those failures I will probably know what's wrong

view this post on Zulip Sajjad Naveed (Oct 01 2024 at 17:51):

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.

view this post on Zulip Anton (Oct 01 2024 at 17:53):

If you scroll up a bit you will probably have a full error/failure message for each test

view this post on Zulip Sajjad Naveed (Oct 01 2024 at 17:53):

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!?!

view this post on Zulip Anton (Oct 01 2024 at 17:55):

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?

view this post on Zulip Sajjad Naveed (Oct 01 2024 at 17:56):

Macbook Pro (M1 Max)

MacOS 15.0 (24A335)

view this post on Zulip Anton (Oct 01 2024 at 17:57):

Yeah, we don't test with macos 15 yet, that could also be the problem

view this post on Zulip Sajjad Naveed (Oct 01 2024 at 17:58):

Hmm, do you think it's worth trying the official installer?

view this post on Zulip Anton (Oct 01 2024 at 18:01):

Actually, I now think xcode problems could be more likely, can you try this?

view this post on Zulip Anton (Oct 01 2024 at 18:02):

I have to go now, but I'll be back tomorrow if you need more help :)

view this post on Zulip Sajjad Naveed (Oct 01 2024 at 18:03):

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.

view this post on Zulip Sajjad Naveed (Oct 01 2024 at 18:30):

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:

view this post on Zulip Notification Bot (Oct 01 2024 at 18:47):

Sajjad Naveed has marked this topic as resolved.

view this post on Zulip Anton (Oct 02 2024 at 09:35):

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 :)

view this post on Zulip Anton (Oct 02 2024 at 09:39):

https://github.com/roc-lang/roc/pull/7137

view this post on Zulip Isaac Van Doren (Nov 09 2024 at 04:07):

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

view this post on Zulip Isaac Van Doren (Nov 09 2024 at 04:25):

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?

view this post on Zulip Sam Mohr (Nov 09 2024 at 04:26):

@Isaac Van Doren these are known failures on debug build, they work on --release

view this post on Zulip Sam Mohr (Nov 09 2024 at 04:26):

So I'd recommend cargo test --release for now

view this post on Zulip Isaac Van Doren (Nov 09 2024 at 04:27):

Perfect, thanks!

view this post on Zulip Brendan Hansknecht (Nov 09 2024 at 06:37):

Maybe we should ignore those in debug builds so people don't hit this?

view this post on Zulip Anton (Nov 09 2024 at 12:52):

https://github.com/roc-lang/roc/pull/7210


Last updated: Jul 06 2025 at 12:14 UTC