I'm trying to set myself up for development on the roc-lang/roc
repo. I've done the following:
roc-lang/roc
repo (main at 69b72866dbd7686ddd3b091516c683304328f292)nix develop
, as described in the docscargo test
, as described in the docs*edit - "the docs" -> https://github.com/roc-lang/roc/blob/69b72866dbd7686ddd3b091516c683304328f292/CONTRIBUTING.md#running-tests *
the cargo test
command then generates test failures. more specifically:
$ cargo test -p roc_repl_expect --lib
running 26 tests
test test::big_recursive_tag_copied_back ... ok
test test::box_with_strings ... ok
test test::arg_parser ... ok
test test::equals_fail ... ok
test test::compare_long_strings ... ok
test test::extra_offset_in_tag_union ... ok
test test::adjacent_lists ... ok
test test::equals_pass ... ok
thread 'test::lookup_clone_result' panicked at 'misaligned pointer dereference: address must be a multiple of 0x8 but is 0x16f7add94', crates/repl_expect/src/app.rs:57:45
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
tests should work on main, right? am I doing something wrong?
I'm not sure all tests should be working on main... maybe there is something special about that package? There are a lot of random packages, and may that is specific to WASM or dev backend or REPL or something special
Do tests work for you if you run cargo run --release
?
I tried cargo run --release
and it looks like it's spitting out the same text I would get if I ran roc
on it's own, i.e.:
$ cargo run --release
The current directory (/Users/___/Repos/roc) does not contain a main.roc file to use as a default.
You can run `roc help` for more information on how to provide a .roc file.
so it looks like the compilation is working! but this isn't the same as running tests, right? this just runs the main program compiled from source?
I ask just because, from my interpretation of CONTRIBUTING.md, I should be running tests to confirm any changes I make to the source code. am I understanding that right?
Yeah sorry I meant cargo test --release
ahh gotcha, my bad I should've realized that's what you meant :sweat_smile: running now...
all tests pass! thanks :+1:
-> should the docs be changed to note that tests should be run with --release
?
No, this should be a temporary situation so we shouldn't update the docs for it.
We should get the test working or ignore it.
Gotcha. Should I put in a bug for it then?
Went ahead a made a bug for this, feel free to close if that's not appropriate
https://github.com/roc-lang/roc/issues/6100
That's great, thanks!
Becker A. has marked this topic as resolved.
Last updated: Jul 06 2025 at 12:14 UTC