mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
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>
9 lines
303 B
Text
9 lines
303 B
Text
# TEST: Direct call to Utils (no imports in Utils)
|
|
app [process_string] { pf: platform "./platform/main.roc" }
|
|
|
|
import pf.Utils
|
|
|
|
process_string : Str -> Str
|
|
process_string = |input|
|
|
# Include expected substring for test validation
|
|
"Got the following from the host: ${input} ${Utils.tag(input)}"
|