Commit graph

36427 commits

Author SHA1 Message Date
Richard Feldman
8f1a53ffe7
fix CI 2025-12-12 22:20:52 -05:00
Richard Feldman
22c6138044
Add some cache cleanup notes 2025-12-12 21:50:56 -05:00
Richard Feldman
34e66aa069
Add cache cleanup 2025-12-12 19:42:05 -05:00
Anton-4
6fabcdeb0e
retry on connectTcp flaky (#8652)
Cleared roc cache at C:\Users\runneradmin\AppData\Roaming\Roc Build succeeded! test +- tests_summary    +- run test fx_platform_test 35/36 passed, 1 failed error: 'fx_platform_test.test.external platform memory alignment regression' failed: Run failed with exit code 3 STDOUT:  STDERR: thread 2760 panic: reached unreachable code C:\a\_temp\0f24a2ca-ec71-410b-9a5b-1091de9378c7\zig-aarch64-windows-0.15.2\lib\std\fs\Dir.zig:1642:35: 0x7ff65697cb67 in makeOpenDirAccessMaskW (roc_zcu.obj)         .OBJECT_PATH_NOT_FOUND => return error.FileNotFound,                                   ^ C:\a\_temp\0f24a2ca-ec71-410b-9a5b-1091de9378c7\zig-aarch64-windows-0.15.2\lib\std\fs\Dir.zig:1574:21: 0x7ff6567c91b7 in openDirW (roc_zcu.obj)         else => |e| return e,                     ^ C:\a\_temp\0f24a2ca-ec71-410b-9a5b-1091de9378c7\zig-aarch64-windows-0.15.2\lib\std\fs\Dir.zig:1448:13: 0x7ff6565e253b in openDir (roc_zcu.obj)             return self.openDirW(sub_path_w.span().ptr, args);             ^ C:\a\_temp\0f24a2ca-ec71-410b-9a5b-1091de9378c7\zig-aarch64-windows-0.15.2\lib\std\net.zig:937:39: 0x7ff656b14e57 in getAddressList (roc_zcu.obj)                 .WSAHOST_NOT_FOUND => return error.UnknownHostName,                                       ^ C:\a\_temp\0f24a2ca-ec71-410b-9a5b-1091de9378c7\zig-aarch64-windows-0.15.2\lib\std\net.zig:837:18: 0x7ff656d79307 in tcpConnectToHost (roc_zcu.obj)     const list = try getAddressList(allocator, name, port);                  ^ C:\a\_temp\0f24a2ca-ec71-410b-9a5b-1091de9378c7\zig-aarch64-windows-0.15.2\lib\std\http\Client.zig:1441:34: 0x7ff656d2b843 in connectTcpOptions (roc_zcu.obj)         error.UnknownHostName => return error.UnknownHostName,                                  ^ C:\a\_temp\0f24a2ca-ec71-410b-9a5b-1091de9378c7\zig-aarch64-windows-0.15.2\lib\std\http\Client.zig:1408:5: 0x7ff656d2bbdb in connectTcp (roc_zcu.obj)     return connectTcpOptions(client, .{ .host = host, .port = port, .protocol = protocol });     ^ C:\a\_temp\0f24a2ca-ec71-410b-9a5b-1091de9378c7\zig-aarch64-windows-0.15.2\lib\std\http\Client.zig:1583:14: 0x7ff656cbfb57 in connect (roc_zcu.obj)     } orelse return client.connectTcp(host, port, protocol);              ^ C:\a\_temp\0f24a2ca-ec71-410b-9a5b-1091de9378c7\zig-aarch64-windows-0.15.2\lib\std\http\Client.zig:1699:18: 0x7ff656c1785f in request (roc_zcu.obj)         break :c try client.connect(host_name, uriPort(uri, protocol), protocol);                  ^ C:\a\_temp\0f24a2ca-ec71-410b-9a5b-1091de9378c7\zig-aarch64-windows-0.15.2\lib\std\http\Client.zig:1789:15: 0x7ff656b15adf in fetch (roc_zcu.obj)     var req = try request(client, method, uri, .{               ^ C:\a\_temp\0f24a2ca-ec71-410b-9a5b-1091de9378c7\zig-aarch64-windows-0.15.2\lib\std\debug.zig:559:14: 0x7ff656564ac7 in assert (roc_zcu.obj)     if (!ok) unreachable; // assertion failure              ^ C:\a\_temp\0f24a2ca-ec71-410b-9a5b-1091de9378c7\zig-aarch64-windows-0.15.2\lib\std\os\windows.zig:596:11: 0x7ff6565673bf in CloseHandle (roc_zcu.obj)     assert(ntdll.NtClose(hObject) == .SUCCESS);           ^ C:\a\_temp\0f24a2ca-ec71-410b-9a5b-1091de9378c7\zig-aarch64-windows-0.15.2\lib\std\fs\File.zig:204:28: 0x7ff65656e1db in close (roc_zcu.obj)         windows.CloseHandle(self.handle);                            ^ C:\a\roc\roc\src\unbundle\download.zig:249:23: 0x7ff6569c052b in downloadToFile (roc_zcu.obj)             file.close();                       ^ C:\a\roc\roc\src\unbundle\download.zig:134:45: 0x7ff656817ddb in downloadAndExtract (roc_zcu.obj)     const temp_filename = try downloadToFile(allocator, url, extract_dir, base58_hash, &temp_filename_buf);                                             ^ C:\a\roc\roc\src\cli\main.zig:2994:40: 0x7ff65664157f in resolveUrlPlatform (roc_zcu.obj)             download.downloadAndExtract(&gpa_copy, url, new_package_dir) catch |download_err| {                                        ^ C:\a\roc\roc\src\cli\main.zig:2890:34: 0x7ff6566480b7 in resolvePlatformSpecToPaths (roc_zcu.obj)         return resolveUrlPlatform(allocs, platform_spec);                                  ^ C:\a\roc\roc\src\cli\main.zig:972:54: 0x7ff656645b67 in rocRun (roc_zcu.obj)     const platform_paths = resolvePlatformSpecToPaths(allocs, platform_spec, app_dir) catch |err| {                                                      ^ C:\a\roc\roc\src\cli\main.zig:739:23: 0x7ff6567c42b3 in mainArgs (roc_zcu.obj)             try rocRun(allocs, run_args);                       ^ C:\a\roc\roc\src\cli\main.zig:678:13: 0x7ff6567c5923 in main (roc_zcu.obj)     mainArgs(&allocs, args) catch {             ^ C:\a\_temp\0f24a2ca-ec71-410b-9a5b-1091de9378c7\zig-aarch64-windows-0.15.2\lib\std\start.zig:602:28: 0x7ff6567c5efb in main (roc_zcu.obj)     return callMainWithArgs(@as(usize, @intCast(c_argc)), @as([*][*:0]u8, @ptrCast(c_argv)), envp);                            ^ C:\a\_temp\0f24a2ca-ec71-410b-9a5b-1091de9378c7\zig-aarch64-windows-0.15.2\lib\libc\mingw\crt\crtexe.c:259:0: 0x7ff65701a2bb in __tmainCRTStartup (crt2.obj)     mainret = _tmain (argc, argv, envp);  C:\a\_temp\0f24a2ca-ec71-410b-9a5b-1091de9378c7\zig-aarch64-windows-0.15.2\lib\libc\mingw\crt\crtexe.c:179:0: 0x7ff65701a327 in mainCRTStartup (crt2.obj)   ret = __tmainCRTStartup ();  ???:?:?: 0x7ffbb394873f in ??? (KERNEL32.DLL) ???:?:?: 0x7ffbb6ae4463 in ??? (ntdll.dll)  C:\a\roc\roc\src\cli\test\fx_platform_test.zig:69:17: 0x7ff65e775a4f in checkSuccess (fx_platform_test_zcu.obj)                 return error.RunFailed;                 ^ C:\a\roc\roc\src\cli\test\fx_platform_test.zig:1163:5: 0x7ff65e780943 in test.external platform memory alignment regression (fx_platform_test_zcu.obj)     try checkSuccess(run_result);     ^ error: while executing test 'fx_test_specs.test.find by path works', the following test command failed: "C:\\Users\\runneradmin\\AppData\\Local\\zig\\o\\47d06347fb2b8bb1799a7b19156ede3f\\fx_platform_test.exe" "--cache-dir=C:\\Users\\runneradmin\\AppData\\Local\\zig" --seed=0x59c23868 --listen=-  Build Summary: 86/89 steps succeeded; 1 failed; 1908/1912 tests passed; 3 skipped; 1 failed test transitive failure +- tests_summary transitive failure    +- run test fx_platform_test 35/36 passed, 1 failed  error: the following build command failed with exit code 1: C:\Users\runneradmin\AppData\Local\zig\o\8f4b00b4a8d55e5b952be7182a09f3b9\build.exe C:\a\_temp\0f24a2ca-ec71-410b-9a5b-1091de9378c7\zig-aarch64-windows-0.15.2\zig.exe C:\a\_temp\0f24a2ca-ec71-410b-9a5b-1091de9378c7\zig-aarch64-windows-0.15.2\lib C:\a\roc\roc C:\Users\runneradmin\AppData\Local\zig C:\Users\runneradmin\AppData\Local\zig --seed 0x59c23868 -Z96370e066f7f6be0 test -Dfuzz -Dsystem-afl=false

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2025-12-12 19:16:11 +01:00
Anton-4
aa2e1b80cd
All roc syntax test (#8622)
* added all_roc_syntax_test

* fmt + test

* full test

---------

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2025-12-12 18:07:03 +01:00
Richard Feldman
f8fbc2932d
Merge pull request #8651 from roc-lang/list-join-with
Add `List.join_with`
2025-12-12 11:38:12 -05:00
Richard Feldman
9cd58ee4ab
Merge pull request #8649 from roc-lang/fix-double-decref
Fix double-decref
2025-12-12 10:05:53 -05:00
Richard Feldman
6efd449282
Add List.join_with with type var alias dispatch 2025-12-12 09:21:52 -05:00
Richard Feldman
b2dea15a3e
Add test for small string input in Stdin.line! while loop 2025-12-12 09:08:34 -05:00
Richard Feldman
dce64de490
Merge pull request #8639 from roc-lang/expand-type-var-alias
Add test case for type var alias
2025-12-12 09:04:13 -05:00
Richard Feldman
fae5ddbbe3
Fix double-decref bug in binop_apply and unary_op_apply
When handling low-level lambdas (like Str.is_eq), the code was decrefing
arguments with borrow semantics, but the defer statements at the top of
these functions already handle decrefing. This caused a double-free when
comparing heap-allocated strings (24+ characters).

The fix removes the explicit decrefs in the low-level lambda paths since
the defer statements already handle cleanup.
2025-12-12 09:01:54 -05:00
Anton-4
41815e7b02
fix #8641 (#8644) 2025-12-12 13:28:25 +01:00
Richard Feldman
e1019be2ef
Merge pull request #8627 from roc-lang/fix-another-aoc
Fix tag union handling
2025-12-12 07:09:54 -05:00
Anton-4
33cf64377f
fix pipe retry action (#8640) 2025-12-12 12:35:05 +01:00
Anton-4
0608d4c338
Fix #8517 (#8613)
temp fix expect stack overflow

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2025-12-12 11:30:33 +01:00
Richard Feldman
158cd650f1
Merge origin/main into fix-another-aoc
Resolved merge conflicts in:
- src/cli/test/fx_test_specs.zig (combined test entries from both branches)
- test/snapshots/fuzz_crash/fuzz_crash_027.md (took main's version)
- test/snapshots/fuzz_crash/fuzz_crash_028.md (took main's version)
2025-12-11 23:24:23 -05:00
Richard Feldman
f0cf4e2007
Merge origin/main into fix-another-aoc
Resolved merge conflicts in:
- src/cli/test/fx_test_specs.zig (combined test entries from both branches)
- test/snapshots/fuzz_crash/fuzz_crash_027.md (took main's error message format)
- test/snapshots/fuzz_crash/fuzz_crash_028.md (took main's error message format)
2025-12-11 23:18:39 -05:00
Richard Feldman
a6c2c30661
Merge pull request #8638 from roc-lang/fix-list-first-panic-8633
Fix List.first dispatch panic
2025-12-11 23:05:16 -05:00
Richard Feldman
857b5c27f7
Add from_str test case for type var alias 2025-12-11 23:04:39 -05:00
Richard Feldman
3947f718f6
Merge pull request #8636 from roc-lang/type-var-alias
Static dispatch on non-args
2025-12-11 22:51:48 -05:00
Richard Feldman
3956e185fe
Update docs 2025-12-11 22:15:18 -05:00
Richard Feldman
cdafc209b9
Merge origin/main into fix-list-first-panic-8633
Resolved conflict in fx_test_specs.zig by including both:
- list_append_stdin_uaf.roc test from main
- list_first_method.roc and list_first_function.roc regression tests from this branch

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 21:43:44 -05:00
Richard Feldman
2d863e9073
Fix panics 2025-12-11 21:13:15 -05:00
Richard Feldman
9a4bfebf20
Merge pull request #8635 from roc-lang/fix-refcount
Add a missing refcount
2025-12-11 17:25:20 -05:00
Richard Feldman
c99b06f2e5
Improve test coverage for type variable alias static dispatch 2025-12-11 16:37:13 -05:00
Richard Feldman
28d5ab5602
Implement type variable alias for static dispatch on type parameters 2025-12-11 16:37:12 -05:00
Richard Feldman
c7fd764eb3
Add snapshot test for type var alias static dispatch 2025-12-11 16:37:07 -05:00
Richard Feldman
1c6c649744
Implement type checking and interpreter for type var dispatch 2025-12-11 16:36:52 -05:00
Richard Feldman
e888ce0b6d
Add type var alias stmt and type var dispatch expr 2025-12-11 16:36:28 -05:00
Richard Feldman
b6428ef704
Merge pull request #8631 from roc-lang/aligncast-helper
Update alignCast to use new helper
2025-12-11 16:35:01 -05:00
Richard Feldman
0d2e91a998
Merge pull request #8632 from roc-lang/type-checker-stuff
Fix some more type checker error handling
2025-12-11 16:34:50 -05:00
Richard Feldman
a3d68dbc37
Add a missing refcount 2025-12-11 16:32:07 -05:00
Richard Feldman
fd874201b3
More occurs fixes 2025-12-11 15:25:50 -05:00
Richard Feldman
f92d84323e
Fix tests 2025-12-11 11:49:45 -05:00
Richard Feldman
b660d54c40
Update test 2025-12-11 11:46:15 -05:00
Richard Feldman
ca1a1fa5a6
Fix tag union handling 2025-12-11 11:46:15 -05:00
Richard Feldman
a9878630cc
Refactor to alignedPtrCast 2025-12-11 11:30:06 -05:00
Richard Feldman
8239f7a053
Update alignCast to use new helper 2025-12-11 08:07:29 -05:00
Richard Feldman
530b213843
Fix some more type checker issues 2025-12-11 07:57:17 -05:00
Luke Boswell
85b6a0fb9f
Merge pull request #8628 from roc-lang/improve-bundle
Add `--whole-archive` for WASM and improve `roc bundle`
2025-12-11 20:14:58 +11:00
Luke Boswell
24957cf7af
make bundle more lenient, and improve errors 2025-12-11 17:24:41 +11:00
Luke Boswell
dc58f8a719
ensures all symbols from the static library are included 2025-12-11 17:24:40 +11:00
Luke Boswell
b1d4b36886
Merge pull request #8623 from roc-lang/build-static-lib
Support building static libraries
2025-12-11 17:24:10 +11:00
Luke Boswell
28a46fd33d
bug fixes 2025-12-11 16:06:14 +11:00
Luke Boswell
2c1a3f15ed
Merge remote-tracking branch 'remote/main' into build-static-lib 2025-12-11 15:40:26 +11:00
Richard Feldman
c4c1395769
Merge pull request #8626 from roc-lang/fix-aoc-day-2
Fix rank unification bug
2025-12-10 22:06:53 -05:00
Richard Feldman
b1fd94241b
Merge pull request #8625 from roc-lang/module-resolution-cache
Add a method resolution cache
2025-12-10 21:22:08 -05:00
Luke Boswell
32deed5ec8
fix leak 2025-12-11 12:54:49 +11:00
Luke Boswell (Linux-Desktop)
ca4cf34a19
add a method resolution cache 2025-12-11 12:36:50 +11:00
Richard Feldman
7efcc6ab59
Fix rank unification bug 2025-12-10 20:13:20 -05:00