Skip to content

fix(avr): download registry lib_deps before compilation - #1291

Merged
zackees merged 1 commit into
mainfrom
fix/registry-lib-deps-download-1276
Aug 9, 2026
Merged

fix(avr): download registry lib_deps before compilation#1291
zackees merged 1 commit into
mainfrom
fix/registry-lib-deps-download-1276

Conversation

@zackees

@zackees zackees commented Aug 9, 2026

Copy link
Copy Markdown
Member

Problem

Registry and remote lib_deps entries (e.g., fastled/FastLED@^3.10.3) were classified by fbuild sync but never downloaded by the AVR build orchestrator. The compile step would fail with:

fatal error: FastLED.h: No such file or directory

Fixes #1276.

Root Cause

The ESP32 orchestrator already called ensure_libraries() to download and compile lib_deps before compilation. The AVR orchestrator (and all other non-ESP32 orchestrators using run_sequential_build_with_libs()) did not.

Changes

  1. crates/fbuild-build-engine/src/pipeline/library.rs — New ensure_lib_deps() helper that wraps ensure_libraries() from fbuild-packages. Callable by any orchestrator before the compiler is created.

  2. crates/fbuild-build-mcu/src/avr/orchestrator.rs — Calls ensure_lib_deps() after building the initial include-dir set but before creating the AVR compiler. Downloaded library include dirs are added to the compiler, and library archives are passed as extra link inputs.

Verification

  • soldr cargo check --workspace — clean
  • soldr cargo clippy -p fbuild-build-engine -p fbuild-build-mcu -- -D warnings — clean
  • soldr cargo test -p fbuild-build-mcu -- avr — 27/27 pass
  • soldr cargo test -p fbuild-build-engine -- pipeline — 20/20 pass

Follow-up

Other non-ESP32 orchestrators using run_sequential_build_with_libs() (Teensy, STM32, RP2040, SAM, CH32V, ESP8266, NRF52, Renesas, Silabs, Apollo3, NXP LPC) can adopt the same ensure_lib_deps() helper in follow-up PRs.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 14 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5005cc04-625d-4168-9837-d366d92fef52

📥 Commits

Reviewing files that changed from the base of the PR and between 5effaea and 770d5a8.

📒 Files selected for processing (3)
  • crates/fbuild-build-engine/src/pipeline/library.rs
  • crates/fbuild-build-engine/src/pipeline/mod.rs
  • crates/fbuild-build-mcu/src/avr/orchestrator.rs

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.

Registry and remote lib_deps entries (e.g., fastled/FastLED@^3.10.3)
were classified by 'fbuild sync' but never downloaded by the AVR
build orchestrator, so the compile step couldn't find their headers.

Add a shared ensure_lib_deps() helper to the build pipeline library
module and call it from the AVR orchestrator before the compiler is
created, so downloaded library include directories are available
during compilation and their archives are linked into the firmware.

The ESP32 orchestrator already called ensure_libraries() directly;
this brings the AVR path up to parity. Other non-ESP32 orchestrators
using run_sequential_build_with_libs() (Teensy, STM32, RP2040, SAM,
CH32V, ESP8266, NRF52, Renesas, Silabs, Apollo3, NXP LPC) can adopt
the same ensure_lib_deps() helper in follow-up PRs.

Fixes #1276.

Co-Authored-By: Claude <noreply@anthropic.com>
@zackees
zackees force-pushed the fix/registry-lib-deps-download-1276 branch from a44f546 to 770d5a8 Compare August 9, 2026 23:25
@zackees
zackees merged commit da3c960 into main Aug 9, 2026
92 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

lib_deps registry entries are never fetched: fbuild sync writes status "unresolved" and the build fails on a missing header

1 participant