fix(rs): pass _select seeds to awk via ENVIRON for BSD awk - #4568
Conversation
BSD awk (macOS) rejects a newline in a -v value, so the macOS platform job failed on any PR touching two or more crates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
MERGE Positive improvement: yes. Worth the complexity: yes — tiny, localized justfile change with a clear comment. No public API or wire impact. Different approach: none better. Alternatives like joining seeds on a delimiter other than newline, or shell-looping instead of awk, would either redo the same contract or add more surface area. The new two-crate Ship it. This is an automated review, not the maintainer's decision |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review. WalkthroughThe _select command now passes its seed list to awk through the SEEDS environment variable. The _select-test check verifies that a diff containing two crate paths selects both crate names. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The crate-selection change preserves both seeds in the inspected implementation, and the test checks that both crates are selected. No merge-blocking risk is evident; normal checks remain appropriate. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches✨ Simplify code
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 |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head 6afea661334139a7771ec42552a6c13cde049b07.
No correctness findings in the reviewed diff. Direction: this is a focused, worthwhile fix. At rs/justfile:225-226, passing the quoted seed list through the command's environment preserves the newline-separated input without changing the dependency walk. POSIX specifies ENVIRON values as environment-variable strings. No new dependency or delimiter scheme is needed, and there is no public API or wire impact.
Nonblocking test suggestion (rs/justfile:413-416): run the multi-seed selector test with BSD/one-true-awk in CI, for example in the macOS job. The new case guards the union behavior on Linux, but this recipe-only PR makes _select return ALL at line 176 before reaching awk in the platform job, and _platform does not run _select-test. The specific portability regression therefore is not exercised there.
Validation: bash -n passed for both extracted recipe bodies. Ten fixture-backed checks of the exact _select body passed with Bash, jq, and mawk 1.3.4, covering multi-seed selection, transitive dependents, duplicate seeds, dependency-free crates, cycles, and empty/non-crate inputs. Cargo metadata was stubbed. BSD awk, Cargo, Nix, and just were unavailable here, so I did not independently reproduce the BSD failure or run the repository test suite.
(Written by review (OpenAI))
just rs _selectpassed the newline-separated seed list to awk with-v seeds=.... GNU awk accepts that, but BSD awk (macOS) rejects a newline in a-vvalue:So the macOS
platformjob failed on any PR touching two or more crates (e.g. #4527). The seeds now go throughENVIRON, which is POSIX and takes any value.Reproduced on Linux with nixpkgs
nawk(the one-true-awk macOS ships) asawkonPATH: the old recipe exits 2, the new one selects all crates, andjust rs _select-testpasses._select-testalso gains a two-crate case; it runs under GNU awk on Linux CI, so it guards the union behaviour rather than the BSD quirk.Public API / wire impact: none (CI recipe only).
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code