Commit graph

10297 commits

Author SHA1 Message Date
Sam Mohr
279301faa3
Remove unused insta dependency from can 2025-01-08 18:02:44 -08:00
Luke Boswell
cc4d01f63e
allow(clippy::match_single_binding) 2025-01-09 12:27:25 +11:00
Sam Mohr
2010ada504
Fix mono tests 2025-01-08 17:15:23 -08:00
Sam Mohr
82b7279485
Fix formatting 2025-01-08 17:04:28 -08:00
Sam Mohr
2150ee2219
Remove Task from Roc 2025-01-08 17:00:40 -08:00
Luke Boswell
37cd04c002
Merge branch 'main' into simplify-refcount 2025-01-09 10:18:00 +11:00
Anthony Bullard
20b20019a1
Fix snapshot that somehow I missed 2025-01-08 16:05:42 -06:00
Anthony Bullard
9b9b6d39f3
Fix clippy 2025-01-08 15:37:03 -06:00
Anthony Bullard
3a6225c354
Fix builtin formatting 2025-01-08 15:20:04 -06:00
Anthony Bullard
739dda6f5e
Cover hidden pattern match cases for Pizza 2025-01-08 15:05:55 -06:00
Anthony Bullard
898b3f55e5
Move PNC apply to separate Expr/Pattern variant 2025-01-08 14:47:49 -06:00
Sam Mohr
8e5d875604
Merge branch 'main' into auto-snake-case 2025-01-08 01:51:12 -08:00
Luke Boswell
3e0c626bf6
Merge pull request #7401 from roc-lang/cleanup-examples
Cleanup Examples folder
2025-01-08 20:30:27 +11:00
Luke Boswell
68f4aabbce
remove example formatting test from test_syntax 2025-01-08 16:36:34 +11:00
Luke Boswell
99dfc5529d
Merge pull request #7450 from roc-lang/ayaz/bugfix-ts
Minor simplifications to typechecker
2025-01-08 16:28:25 +11:00
Luke Boswell
e18b43761a
Merge pull request #7459 from roc-lang/ayaz/panic-catcher
Catch panics that happen within repl step executions
2025-01-08 15:56:15 +11:00
Luke Boswell
ae9e244548
remove references to virtual-dom example 2025-01-08 15:55:05 +11:00
Luke Boswell
7e55990c55
try remove new unwrap 2025-01-08 14:07:53 +11:00
Luke Boswell
9c527f890f
enable --root-dir for roc docs 2025-01-08 13:43:42 +11:00
Luke Boswell
80fbe4333d
fix glue for platform-switching/zig-platform 2025-01-08 11:11:51 +11:00
Luke Boswell
066f70f3ab
Merge remote-tracking branch 'remote/main' into cleanup-examples 2025-01-08 11:04:07 +11:00
Sam Mohr
3d4c302807
Fix tests 2025-01-07 14:01:03 -08:00
Sam Mohr
11b720d355
Fix docs issues 2025-01-07 13:18:58 -08:00
Sam Mohr
7a2f8bfa71
Merge branch 'main' into auto-snake-case 2025-01-07 13:18:41 -08:00
Luke Boswell
8540aa1a14
Merge pull request #7321 from shua/fromutf8
DO NOT MERGE update Str.fromUtf8 error type
2025-01-08 07:56:40 +11:00
Anton-4
4c0d19d837
Merge pull request #7475 from roc-lang/fix-flaky-cli-tests-zig
fix cli_test effectful_form getting stuck
2025-01-07 19:45:52 +01:00
Anton-4
6c09f5eed3
typo
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2025-01-07 19:44:45 +01:00
Jakub Konka
13e6ac7629
Merge pull request #7474 from kubkon/macho-ignore-setjmp-longjmp
linker/macho: ignore setjmp and longjmp since they are only used by roc test
2025-01-07 18:09:08 +01:00
Michał Kukieła
1c83ce4d8d
Mark :target entry using border
Commit a3762f60ad marked the current (:target) entry using background color. But then 11e736f3e8 set the background color for all entries. Thus we need another way to highlight the entry pointed at by the URL fragment.

Signed-off-by: Michał Kukieła <53443372+kukimik@users.noreply.github.com>
2025-01-07 17:40:51 +01:00
Anton-4
6ccc828ee5
correct error message 2025-01-07 16:32:16 +01:00
Anton-4
4c33cb6686
fix cli_test effectful_form getting stuck 2025-01-07 14:30:38 +01:00
Jakub Konka
7200c992ff
linker/macho: ignore setjmp and longjmp since they are only used by roc test 2025-01-06 22:56:50 +01:00
Timon
716374cfc0
Fixed Issue #6929 Escape unicode when inspecting a Str (#7411)
* Fixed Issue #6929 Escape unicode when inspecting Str

added AUTHORS

improved comment

* update generated mono tests

* fixed formatting

* fixed merge conflicts
2025-01-06 18:52:50 +01:00
Sam Mohr
c0cf55c107
Fix valgrind tests 2025-01-05 21:36:27 -08:00
Sam Mohr
83b8b0e557
Update uitests 2025-01-05 21:25:22 -08:00
Sam Mohr
f524d35114
Fix module formatting 2025-01-05 21:04:58 -08:00
Ayaz Hafiz
70b80c275f
Avoid panic 2025-01-05 23:54:47 -05:00
Ayaz Hafiz
a003a16979
Catch panics that happen within repl step executions
Example session:

```
» 1 + 1
The Roc compiler had an internal error.
Please file a bug report at
    https://github.com/roc-lang/roc/issues/new
Please include the following data:

Error message: intentional panic
Stack backtrace:
   0: std::backtrace_rs::backtrace::libunwind::trace
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1: std::backtrace_rs::backtrace::trace_unsynchronized
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2: std::backtrace::Backtrace::create
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/backtrace.rs:331:13
   3: panic_hook
             at ./crates/repl_cli/src/lib.rs:52:41
   4: call<fn(&core::panic::panic_info::PanicInfo), (&core::panic::panic_info::PanicInfo)>
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/ops/function.rs:79:5
   5: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/alloc/src/boxed.rs:2029:9
   6: std::panicking::rust_panic_with_hook
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:785:13
   7: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:651:13
   8: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/sys_common/backtrace.rs:171:18
   9: rust_begin_unwind
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:647:5
  10: core::panicking::panic_fmt
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/panicking.rs:72:14
  11: step
             at ./crates/repl_ui/src/repl_state.rs:66:9
  12: {closure#1}
             at ./crates/repl_cli/src/lib.rs:109:21
  13: call_once<roc_repl_cli::main::{closure_env#1}, ()>
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/ops/function.rs:250:5
  14: call_once<roc_repl_ui::repl_state::ReplAction, roc_repl_cli::main::{closure_env#1}>
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/panic/unwind_safe.rs:272:9
  15: do_call<core::panic::unwind_safe::AssertUnwindSafe<roc_repl_cli::main::{closure_env#1}>, roc_repl_ui::repl_state::ReplAction>
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:554:40
  16: ___rust_try
  17: try<roc_repl_ui::repl_state::ReplAction, core::panic::unwind_safe::AssertUnwindSafe<roc_repl_cli::main::{closure_env#1}>>
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:518:19
  18: catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<roc_repl_cli::main::{closure_env#1}>, roc_repl_ui::repl_state::ReplAction>
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panic.rs:142:14
  19: main
             at ./crates/repl_cli/src/lib.rs:108:30
  20: main
             at ./crates/cli/src/main.rs:321:16
  21: call_once<fn() -> core::result::Result<(), std::io::error::Error>, ()>
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/ops/function.rs:250:5
  22: __rust_begin_short_backtrace<fn() -> core::result::Result<(), std::io::error::Error>, core::result::Result<(), std::io::error::Error>>
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/sys_common/backtrace.rs:155:18
  23: {closure#0}<core::result::Result<(), std::io::error::Error>>
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/rt.rs:166:18
  24: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/ops/function.rs:284:13
  25: std::panicking::try::do_call
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:554:40
  26: std::panicking::try
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:518:19
  27: std::panic::catch_unwind
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panic.rs:142:14
  28: std::rt::lang_start_internal::{{closure}}
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/rt.rs:148:48
  29: std::panicking::try::do_call
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:554:40
  30: std::panicking::try
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:518:19
  31: std::panic::catch_unwind
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panic.rs:142:14
  32: std::rt::lang_start_internal
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/rt.rs:148:20
  33: lang_start<core::result::Result<(), std::io::error::Error>>
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/rt.rs:165:17
  34: _main

Machine Target: MacArm64
```
2025-01-05 23:54:47 -05:00
Ayaz Hafiz
be99b82319
Drop debug assert
I don't think this assert is actually accurate.
2025-01-05 23:54:37 -05:00
Ayaz Hafiz
561f3d9711
Store lambda set variables as flex inference variables
This is actually correct - the rigid approach is not. Lambda set
variables should be inferred in-scope.
2025-01-05 23:54:37 -05:00
Ayaz Hafiz
54cc5e4c29
Unify let-introduction in a single path
Remove branches on determining how let-bindings are introduced to the
scope. This is maybe a little more inefficient, but I think it is a huge
simplification.

One additional change this required was changing how fx suffixes are
checked. The current implementation would add additional constraints for
patterns in let bindings conditionally. However, this is unnecessary. I
believe it is sufficient to check the fx suffix by running the checks on
all introduced symbols after the type is well known (i.e. the body is
checked).
2025-01-05 23:54:37 -05:00
Ayaz Hafiz
bd2dd66c96
Store rigid vars with location during constraining 2025-01-05 23:54:36 -05:00
Ayaz Hafiz
830f0ac35f
Bugfix association of inferred-tag-extension variables
These are inferred vars, not rigids.
2025-01-05 23:54:36 -05:00
Luke Boswell
89ef225f5b
Merge pull request #7468 from joshuawarner32/fuzzing-bugs-9
And... more fuzzing bugs!
2025-01-06 14:28:18 +11:00
Sam Mohr
cd0e2a4474
Merge branch 'main' into auto-snake-case 2025-01-05 16:50:24 -08:00
Joshua Warner
9fcefb3fd4
Remove panic to appease the panic tracker for now 2025-01-05 16:49:08 -08:00
Sam Mohr
0f90f53b35
Update syntax tests 2025-01-05 16:41:40 -08:00
Joshua Warner
090473434d
Move backtracking for implements to specific spaces case that it's actually needed for, to avoid excess parsing work in extreme cases 2025-01-05 15:10:13 -08:00
Joshua Warner
6edfc0aa90
Fix double-wrapping of spaces before implements opaque keyword by making them distinct 2025-01-05 15:10:13 -08:00
Joshua Warner
8955f3e124
Fix indentation of record updates and calculation of return indentation 2025-01-05 15:10:12 -08:00