Commit graph

262 commits

Author SHA1 Message Date
Luke Boswell
f6430cb5c6
Merge remote-tracking branch 'remote/cli-err-reporting' into implement-box-with-cli-err-reporting 2025-12-17 15:28:54 +11:00
Luke Boswell
42937e1728
fix windows targets for test platforms 2025-12-17 14:35:16 +11:00
Luke Boswell
6a1086e0a9
migrate IO to ctx, add new violation check 2025-12-17 14:03:22 +11:00
Luke Boswell
2edc1f4c86 fix windows targets for test platforms 2025-12-16 23:12:39 +11:00
Luke Boswell
e9ecd840c5
fix parallel build race condition with content-hashed shim files
The platform shim generation was writing to fixed filenames (platform_shim.bc
and platform_shim.o) in the shared cache directory, causing race conditions
when multiple builds ran in parallel.

Fix: Include a CRC32 hash of the serialized module content in the shim
filenames. Each unique module content now gets its own shim files, allowing
parallel builds to proceed without interfering with each other.

Also:
- Remove obsolete wasm-elem test platform from build.zig
- Update CLI tests to run in parallel instead of sequentially

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 17:16:13 +11:00
Luke Boswell
cd6a5900c6
fix multi-module platform exposes and add str platform tests
Fix a bug where platforms exposing multiple modules would fail at runtime
with "nested value not found" errors when modules call each other's methods.

Root cause: compileAndSerializeModulesForEmbedding was passing module names
in the wrong order (exposed_modules.items vs sorted_modules), and wasn't
passing type module names when compiling sibling platform modules.

Changes:
- src/cli/main.zig: Pass sorted_modules as type module names when compiling
  platform modules, platform main, and app modules
- src/eval/interpreter.zig: Improve error messages for nested_value_not_found
- src/canonicalize/Can.zig: Add trace output for nested_value_not_found

Test infrastructure:
- Add SimpleTestSpec and simple_list variant to platform_config.zig
- Add 8 str platform tests covering direct calls, transitive calls, and
  diamond dependency patterns
- Update test_runner.zig to handle simple_list
- Add test_runner invocations for int and str platforms to build.zig
- Make CLI tests run sequentially to avoid cache race conditions

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 17:10:56 +11:00
Luke Boswell
0a6817b72e
expand scope of @panic purge 2025-12-16 16:16:04 +11:00
Luke Boswell
19c6bf4078
purge @panic from the interpreter - use roc crash instead 2025-12-16 13:05:46 +11:00
Luke Boswell
2bdbe87be0
add trace_modules feature 2025-12-16 11:25:17 +11:00
Brendan Hansknecht
8e8e6d9848
default to tracy_callstack off
It is just super slow and expensive to have all the time
2025-12-15 09:05:49 -08:00
Brendan Hansknecht
cfc42703c7
update tracy hooks
Properly add tracy to the interpreter shim (requires linking c++ when tracy is enabled.
Add tracy hooks to way more functions,
Wrap more zig allocators with tracy hooks.
Add tracy hooks to the roc_ops and allocations.
Also, tracy callstack now works on macos
2025-12-15 00:22:16 -08:00
Anton-4
41815e7b02
fix #8641 (#8644) 2025-12-12 13:28:25 +01:00
Luke Boswell
2c1a3f15ed
Merge remote-tracking branch 'remote/main' into build-static-lib 2025-12-11 15:40:26 +11:00
Luke Boswell
c31209f615
big cleanup 2025-12-11 11:20:08 +11:00
Luke Boswell
22b1ffce82
Merge remote-tracking branch 'remote/main' into build-static-lib 2025-12-11 09:05:01 +11:00
Richard Feldman
d91a8aa534
Add lint for no // ======= comments 2025-12-10 15:31:53 -05:00
Luke Boswell
38c474176c
initial implementation 2025-12-10 15:37:13 +11:00
Richard Feldman
bb5fd15709
Merge origin/main 2025-12-09 20:08:16 -05:00
Richard Feldman
ad1bee07f4
Fix zig lints, add zig lints to minici, update snapshots 2025-12-09 20:05:01 -05:00
Richard Feldman
7d099cdd50
Fix CI 2025-12-09 16:56:09 -05:00
Luke Boswell
dcb602c5ad
fix windows support for platforms and glibc symbols 2025-12-09 15:39:46 +11:00
Luke Boswell
3703737766
Cleanup target handling and deuplication 2025-12-09 13:30:36 +11:00
Luke Boswell
4885c439f5
Merge remote-tracking branch 'remote/main' into roc-build 2025-12-09 11:08:22 +11:00
Luke Boswell
17b87a954f
refactor to use common runner for test platforms 2025-12-09 11:06:04 +11:00
Luke Boswell
5c6350336d
WIP - adding more reporting, restore glibc support 2025-12-09 09:51:47 +11:00
Anton-4
b3e509d18c
print if build succeeded (#8590) 2025-12-08 19:25:43 +01:00
Luke Boswell
bb8d1d221b
cross-compilation changes, remove glibc, simplify test runner and CI 2025-12-08 12:51:19 +11:00
Luke Boswell
433aca7548
Merge remote-tracking branch 'remote/main' into roc-build 2025-12-08 11:37:35 +11:00
Richard Feldman
24dffc2c3f
Fix static-ness of build 2025-12-07 16:38:52 -05:00
Richard Feldman
f08904c4ed
Fix Nix build on CI 2025-12-06 09:39:03 -05:00
Richard Feldman
b1a09477a5
More cleanups 2025-12-04 21:59:02 -05:00
Richard Feldman
54110ce783
Merge remote-tracking branch 'origin/main' into ranges 2025-12-04 18:46:57 -05:00
Richard Feldman
325ca2b6e1
Merge remote-tracking branch 'origin/fix-inspect' into ranges 2025-12-04 11:24:53 -05:00
Richard Feldman
677ff62007
Ban enumFromInt(0) 2025-12-04 10:50:42 -05:00
Richard Feldman
f171021c21
Clean up some comments 2025-12-04 09:56:53 -05:00
Richard Feldman
7a8510aa39
Remove unused parameter suppression lint 2025-12-04 08:05:46 -05:00
Richard Feldman
799dada6a0
Delete a ton of unused arguments 2025-12-04 01:45:48 -05:00
Richard Feldman
1e57610913
Add a lint for disallowing unused variables 2025-12-04 00:53:46 -05:00
Richard Feldman
36885aaad6
Disable canonicalization violation checks for now 2025-12-03 23:33:54 -05:00
Richard Feldman
a428e5c86e
Apply forbidden patterns check to canonicalization 2025-12-03 23:25:44 -05:00
Luke Boswell
25e6832643
merge remote, improve fx test runner 2025-12-04 10:42:44 +11:00
Anton-4
0a11193943
Add missing fx tests (#8556)
* add missing fx tests

* cleanup
2025-12-03 18:00:32 +01:00
Luke Boswell
6fcecc5e77
Merge remote-tracking branch 'remote/main' into roc-build 2025-12-03 16:33:47 +11:00
Richard Feldman
ccb2b897ef
Verify roc formatting in minici 2025-12-02 21:46:30 -05:00
Richard Feldman
987288265d
Add getMethodIdent to forbidden patterns, fix uses 2025-12-02 12:26:59 -05:00
Luke Boswell
dbdb091a9d
delete app stub 2025-12-02 22:06:50 +11:00
Richard Feldman
883da5dd58
Clean up duplicated code 2025-12-01 22:37:33 -05:00
Richard Feldman
205af9f410
Fix open tag union main! 2025-12-01 21:36:27 -05:00
Luke Boswell
0a58002119
add tracing refcounts to fx test platform 2025-11-30 13:07:17 +11:00
Luke Boswell
34e8dad7d4
clear roc cache on zig build roc too 2025-11-30 13:03:25 +11:00