❯ RUST_BACKTRACE=1 ./target/debug/roc repl
The rockin' roc repl
────────────────────────
Enter an expression, or :help, or :q to quit.
» 1 + 2
thread 'main' panicked at core/src/panicking.rs:221:5:
unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX`
stack backtrace:
0: rust_begin_unwind
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:665:5
1: core::panicking::panic_nounwind_fmt::runtime
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:112:18
2: core::panicking::panic_nounwind_fmt
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:122:5
3: core::panicking::panic_nounwind
at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:221:5
4: precondition_check
at /Users/anthonybullard/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ub_checks.rs:70:21
5: from_raw_parts<u64>
at /Users/anthonybullard/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ub_checks.rs:77:17
6: deserialize_slice<u64>
at ./crates/compiler/serialize/src/bytes.rs:35:26
7: deserialize_solved_implementations
at ./crates/compiler/can/src/abilities.rs:1197:35
8: deserialize
at ./crates/compiler/can/src/module.rs:1252:13
9: deserialize_help
at ./crates/compiler/load/src/lib.rs:240:28
10: read_cached_types
at ./crates/compiler/load/src/lib.rs:266:39
11: load
at ./crates/compiler/load/src/lib.rs:37:24
12: load_and_monomorphize_from_str
at ./crates/compiler/load/src/lib.rs:117:11
13: compile_to_mono<core::iter::adapters::map::Map<core::slice::iter::Iter<roc_repl_ui::repl_state::PastDef>, roc_repl_ui::repl_state::{impl#1}::step::{closure_env#0}>>
at ./crates/repl_eval/src/gen.rs:64:18
14: step
at ./crates/repl_ui/src/repl_state.rs:260:36
15: main
at ./crates/repl_cli/src/lib.rs:88:23
16: main
at ./crates/cli/src/main.rs:305:16
17: call_once<fn() -> core::result::Result<(), std::io::error::Error>, ()>
at /Users/anthonybullard/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread caused non-unwinding panic. aborting.
zsh: abort RUST_BACKTRACE=1 ./target/debug/roc repl
…/roc issue-7415-parens-and-commas $!⇡ v1.77.2 18:33
❯ rustup which cargo
~/.rustup/toolchains/1.77.2-aarch64-apple-darwin/bin/cargo
…/roc issue-7415-parens-and-commas $!⇡ v1.77.2 18:35
❯ rustup which rustc
~/.rustup/toolchains/1.77.2-aarch64-apple-darwin/bin/rustc
…/roc issue-7415-parens-and-commas $!⇡ v1.77.2 18:35
❯ RUST_BACKTRACE=1 ./target/debug/roc --version
roc built from commit 5975922a09 with additional changes, committed at 2024-12-28 16:39:39 UTC
I should note that I had to a) Build twice for the build to be successful, b) Am getting a bunch of warnings I've never seen before, mostly from roc_types
I can't repro.
just pulled latest main
roc built from commit 06e78daa91, committed at 2024-12-28 22:05:45 UTC
I am also on aarch64
and am on latest main
Could you try SHA 5975922a09
?
I have no idea how my changes could be causing issues with what appears to be memory layout
$ git switch 5975922a09
fatal: invalid reference: 5975922a09
I assume that is on a fork?
Oh shoot, yeah it's my fork of course
This is the LCA b0d1d16db605c9bbdbbf76d01ca142bd0fb1954c
That commit also works for me
….? WTH
Maybe try git clean -xdf
? and clear all the caches
For some reason my global default toolchain "stable" was being used even though the active toolchain was "1.77.2"(which is correct). This happened after I set stable to default after I installed it to run fuzz tests
I have no idea why the active toolchain was not updating the PATH correctly
I've got something broken because I can't use the cargo +stable ...
syntax
Ah looks like which cargo
(and rustup which cargo) was lying to me. I uninstalled the stable toolchain, and then which cargo
said it was from brew. Uninstalled that thing right away
Had to but ~/.cargo/bin first in my PATH in my zshrc and now everything is working correctly.
Glad you figure it out
Never installing language tooling through brew again
I do wish that all languages had a uniform way of doing version multiplexing and then I could choose whatever tool for a frontend I want
And they all used XDG directories by default
Last updated: Jul 06 2025 at 12:14 UTC