Repository navigation
fix(id): refuse duplicate file names in world compile requests (#1593) - #1594
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 30 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Fixes #1593
What
validate_specinpkgs/id/src/world_compile.rsnow refuses a compile request that carries two files with the same name, with an error naming the duplicated file:Why
Nothing refused duplicate names, and each stage of
world_compile::compilethen treated the request differently (verified in #1593 with a laptop probe driving the verbatim functions):digest_sourcesstill hashed all files, so the installed module'ssource_blake3provenance described sources that were never compiled;main.rocvalidated onfiles[0], but themain.rocread back for the platform-path rewrite — and compiled — was the second one;check_importsscanned shadowed files that never reach the compiler, so a dead file could refuse an otherwise clean compile.compile()callsvalidate_specbeforecheck_imports, the source digest, and staging, so this one refusal closes all four divergences. No digest-format, staging-layout, or provenance-schema change.Tests
duplicate_file_names_are_refusedin theworld_compiletest module: duplicated helper (error names the file), duplicatedmain.roc, and a unique-name control that still validates.cargo test --lib world_compile— 21 passed / 0 failed (20 pre-existing + the new test);cargo fmt --checkclean.probe-2026-10-27-laneB-dupcompile/out-fixed.log): DUP1/DUP2 now refuse naming the file; the unique-name control is unchanged.Need help on this PR? Tag
@codesmith-botwith what you need.