Closed bhansconnect closed 1 year ago
@bhansconnect wow, I'm sorry to have missed this - I believe #4745 fixes this! I no longer get this mono panic, though I do get some zig-related errors that I think are my own local problem. Could you check on #4745?
That seems to have changed the error, but their still is one:
thread '<unnamed>' panicked at 'index out of bounds: the len is 3719 but the index is 3719', crates/compiler/types/src/unification_table.rs:295:49
stack backtrace:
0: rust_begin_unwind
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14
2: core::panicking::panic_bounds_check
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:84:5
3: <usize as core::slice::index::SliceIndex<[T]>>::index
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/slice/index.rs:242:10
4: core::slice::index::<impl core::ops::index::Index<I> for [T]>::index
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/slice/index.rs:18:9
5: <alloc::vec::Vec<T,A> as core::ops::index::Index<I>>::index
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/alloc/src/vec/mod.rs:2627:9
6: roc_types::unification_table::UnificationTable::root_key_without_compacting
at /Users/bren077s/Projects/roc/crates/compiler/types/src/unification_table.rs:295:49
7: roc_types::unification_table::UnificationTable::root_key
at /Users/bren077s/Projects/roc/crates/compiler/types/src/unification_table.rs:283:20
8: roc_types::unification_table::UnificationTable::set_rank
at /Users/bren077s/Projects/roc/crates/compiler/types/src/unification_table.rs:257:24
9: roc_types::subs::Subs::set_rank
at /Users/bren077s/Projects/roc/crates/compiler/types/src/subs.rs:1893:9
10: roc_solve::solve::introduce
at /Users/bren077s/Projects/roc/crates/compiler/solve/src/solve.rs:3881:9
11: roc_solve::solve::solve
at /Users/bren077s/Projects/roc/crates/compiler/solve/src/solve.rs:937:25
12: roc_solve::solve::run_in_place
at /Users/bren077s/Projects/roc/crates/compiler/solve/src/solve.rs:604:17
13: roc_solve::solve::run
at /Users/bren077s/Projects/roc/crates/compiler/solve/src/solve.rs:540:15
14: roc_solve::module::run_solve
at /Users/bren077s/Projects/roc/crates/compiler/solve/src/module.rs:87:37
15: roc_load_internal::file::run_solve_solve
at /Users/bren077s/Projects/roc/crates/compiler/load_internal/src/file.rs:4695:68
16: roc_load_internal::file::run_solve
at /Users/bren077s/Projects/roc/crates/compiler/load_internal/src/file.rs:4804:13
17: roc_load_internal::file::run_task
at /Users/bren077s/Projects/roc/crates/compiler/load_internal/src/file.rs:5863:17
18: roc_load_internal::file::worker_task
at /Users/bren077s/Projects/roc/crates/compiler/load_internal/src/file.rs:2117:34
19: roc_load_internal::file::load_multi_threaded::{{closure}}::{{closure}}
at /Users/bren077s/Projects/roc/crates/compiler/load_internal/src/file.rs:1942:25
20: crossbeam_utils::thread::ScopedThreadBuilder::spawn::{{closure}}
at /Users/bren077s/.cargo/registry/src/github.com-1ecc6299db9ec823/crossbeam-utils-0.8.10/src/thread.rs:438:31
21: core::ops::function::FnOnce::call_once{{vtable.shim}}
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/ops/function.rs:248:5
22: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/alloc/src/boxed.rs:1935:9
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
can you try with a release build of roc? I only saw that in debug build
I hit it in both debug and release on the i4712
branch.
🤨 alright we need a small reproducer
🤦🏼 I had a silly bug. @bhansconnect can you try repelling i4712 and trying again
Seeing this from the roc repo
$ target/debug/roc build --target=wasm32 ../functional-mos6502-web-performance/implementations/roc/emulator.roc
🔨 Rebuilding platform...
0 errors and 0 warnings found in 1345 ms while successfully building:
../functional-mos6502-web-performance/implementations/roc/emulator.wasm
Awesome. Yeah, that fixes this.
Note: the full application at roc_impl
branch will only build with release build of the roc compiler. In debug, it hits:
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
left: `true`,
right: `false`', crates/compiler/mono/src/ir.rs:1180:33
So I am trying to resurrect an old project and get it compiling again. I updated the app to
check
again, but now it is hitting a compiler bug that I am quite uncertain of. Looking for help in debugging/working around this. The project is here: https://github.com/bhansconnect/functional-mos6502-web-performanceI am trying to get
roc build --target=wasm32 implementations/roc/emulator.roc
to work. I partially minimized the example on theminimized
branch. Specifically I get the error when the main `when statement at the bottom of the file has at least 2 matches. If you comment out this line the app will compile.@ayazhafiz, I would assume you would have the best guess here. Any ideas?
Error: