Skip to content

tracking: platform_packages override silently ignored across framework packages (audit, sibling of #663) #664

Closed

Description

@zackees

TL;DR

#663 reports that nxplpc silently ignores platform_packages = framework-arduino-lpc8xx@<URL>#<sha> because ArduinoCoreLpc8xx pins the framework URL + commit + sha256 as const &str and the orchestrator never reads platform_packages from env_config. The same const-pin pattern shows up across every other framework package in crates/fbuild-packages/src/library/. This issue audits each one to find which platforms have the same bug and which (if any) already honor platform_packages.

PlatformIO honors the consumer's platform_packages line. Wherever fbuild silently ignores it, downstream bisection workflows (e.g. FastLED/FastLED#3325) are blocked on the fbuild backend.

Audit result: bug exists in 16 / 16 platforms

Every framework package audited follows the same pattern: URL pinned in a const, only-default constructor, orchestrator never reads platform_packages from env_config. Verdict + evidence is on each child issue.

CMSIS (cmsis_framework.rs, cmsis_atmel.rs) and the PlatformIO registry helper (registry.rs) were out of scope — not user-overridable framework packages.

Next step

The audit showed the bug is universal. The fix proposed in #663 (per-package with_override constructor + shared platform_packages parser) needs to generalize: every orchestrator listed above needs the same plumbing. Folding the override-construction into PackageBase so adding it to a new package is a one-line constructor variant — instead of N hand-written with_overrides — is worth considering before implementation begins.

  • Every child issue investigated and verdict landed.
  • Open a follow-up implementation issue: shared parse_platform_packages_entry helper + PackageBase-level override (or per-package with_override) + orchestrator wiring across all 16 platforms.

Refs

Activity

  1. zackees commented on Jun 20, 2026

    @zackees
    MemberAuthor

    Audit complete — bug exists in 16 / 16 platforms

    Every framework package under crates/fbuild-packages/src/library/ follows the same pattern, verified independently by 16 parallel investigations:

    Platform Child Verdict
    nxplpc #663 bug exists (root case)
    apollo3 #665 bug exists
    arduino_api #666 bug exists
    avr #667 bug exists
    arduino_mbed #668 bug exists
    attiny #669 bug exists
    ch32v #670 bug exists
    esp8266 #671 bug exists
    esp32 (framework + platform) #672 bug exists (both)
    nrf52 #673 bug exists
    renesas #674 bug exists
    rp2040 #675 bug exists
    sam #676 bug exists
    samd #677 bug exists
    silabs #678 bug exists
    stm32 #679 bug exists
    teensy #680 bug exists

    The recurring shape:

    • URL/version/sha256 pinned as const &str in the package source.
    • Only constructor is <Pkg>::new(project_dir) — no override path.
    • Orchestrator's build() instantiates the package directly and never calls config.get_env_config(env_name)?.get("platform_packages").

    PackageBase::new() in crates/fbuild-packages/src/lib.rs:205-227 does accept a url parameter, so per-package with_override constructors are mechanical — but there are 16 of them, so factoring into a single PackageBase::with_url_override(...) and a shared parse_platform_packages(env_config, package_name) helper in fbuild-config is the obvious lift.

    ESP32 is interesting: Esp32Framework already has from_url() (used by the platform.json indirection), but the orchestrator never feeds platform_packages through it. So that one is partially-plumbed — the override hook exists, only the call-site lookup is missing.

    The follow-up implementation issue (per #663's proposed fix shape) is the next step.

  2. zackees commented on Jun 20, 2026

    @zackees
    MemberAuthor

    Implementation follow-up filed: #681 — proposes hoisting with_override + platform_packages parsing into PackageBase so the fix propagates to all 16 orchestrators from one place rather than 16 parallel patches.

  3. zackees commented on Jun 30, 2026

    @zackees
    MemberAuthor

    Rolled up under #867 (audit dashboard meta).

  4. zackees commented on Jun 30, 2026

    @zackees
    MemberAuthor

    All 16 per-platform sub-issues resolved. Shipped PRs:

    Every framework package that consumers can reasonably override now honors platform_packages via PackageBase::with_override + package_override::resolve_override. The downstream bisection workflow (FastLED/FastLED#3325 et al) is unblocked on the fbuild backend.

    Closing via meta-rollup #867.

  5. added a commit that references this issue on Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions