fix(teensy): derive map_path from elf_path (unbreak main CI)#316
Conversation
`build_link_args` was added by #313 (CMSIS-DSP auto-link refactor) but a hold-over from #305 still referenced `output_dir.join("firmware.map")`, which doesn't exist as a parameter of `build_link_args` (it takes `elf_path: &Path`, not `output_dir`). The workspace failed to compile with: error[E0425]: cannot find value `output_dir` in this scope --> crates/fbuild-build/src/teensy/teensy_linker.rs:93:24 Every PR opened against main since #313 has been red because of this. Derive the map path from `elf_path.with_extension("map")`, which is equivalent to `output_dir.join("firmware.map")` since `elf_path = output_dir.join("firmware.elf")` at the only call site. Adds `test_teensy_link_command_emits_linker_map_next_to_elf` so the regression is caught locally next time. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 56 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Summary
build_link_args(added by #313) inherited a hold-over from #305 that referencedoutput_dir.join(\"firmware.map\")— butoutput_dirisn't a parameter ofbuild_link_args; it takeself_path: &Path. The workspace stopped compiling on every PR built against main since #313 landed:Every open PR (#306, #307, #315, …) is red because of this. Hotfix first so the other PRs can get green CI.
Fix
Derive the map path from `elf_path.with_extension("map")`, which is equivalent to `output_dir.join("firmware.map")` since `elf_path = output_dir.join("firmware.elf")` at the only call site. One-line change.
Adds `test_teensy_link_command_emits_linker_map_next_to_elf` to catch this if anyone factors the path source again.
Test plan
🤖 Generated with Claude Code