Skip to content

fix(teensy): derive map_path from elf_path (unbreak main CI)#316

Merged
zackees merged 1 commit into
mainfrom
fix/teensy-linker-output-dir-scope
May 30, 2026
Merged

fix(teensy): derive map_path from elf_path (unbreak main CI)#316
zackees merged 1 commit into
mainfrom
fix/teensy-linker-output-dir-scope

Conversation

@zackees
Copy link
Copy Markdown
Member

@zackees zackees commented May 30, 2026

Summary

build_link_args (added by #313) inherited a hold-over from #305 that referenced output_dir.join(\"firmware.map\") — but output_dir isn't a parameter of build_link_args; it takes elf_path: &Path. The workspace stopped compiling on every PR built against main since #313 landed:

error[E0425]: cannot find value \`output_dir\` in this scope
  --> crates/fbuild-build/src/teensy/teensy_linker.rs:93:24

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

  • `soldr cargo check -p fbuild-build` — clean
  • `soldr cargo test -p fbuild-build --lib teensy::teensy_linker` — 6/6 pass (5 existing + 1 new)
  • `soldr cargo clippy -p fbuild-build --all-targets -- -D warnings` — clean

🤖 Generated with Claude Code

`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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

Warning

Review limit reached

@zackees, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 04a7c0f9-fd9c-45ac-8e13-a7e6a7f53c2c

📥 Commits

Reviewing files that changed from the base of the PR and between 3cf0eed and 2d93746.

📒 Files selected for processing (1)
  • crates/fbuild-build/src/teensy/teensy_linker.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/teensy-linker-output-dir-scope

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zackees zackees merged commit 8bfba3b into main May 30, 2026
80 of 87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant