Skip to content

silabs-core: the check fails on extra/core-api, which fbuild deliberately supplies itself #1421

Description

@zackees

Split from #1400, which flagged SiliconLabs/arduino@2.2.0 as unverified. It is now confirmed — and the obvious fix is the wrong one.

Confirmed broken

Nightly Platforms run 33866723360 (2026-09-04) failed on Silicon Labs MGM240 / build and SparkFun Thing Plus Matter / build:

build error: package error: silabs-core unpacked without its submodule contents.
These directories are declared in .gitmodules and came out empty:
  - extra/core-api

Verified by downloading the pinned archive: arduino-2.2.0/extra/core-api/ is present with exactly one entry — the empty directory itself, alongside a .gitmodules declaring it. Green through 2026-08-24; #1401 merged 2026-08-28.

Why the release-asset fix is wrong here

SiliconLabs/arduino does publish a release asset, so this looks like a copy of the ESP8266 fix (#1398):

$ gh release view 2.2.0 --repo SiliconLabs/arduino --json assets
silabs_arduino_core-2.2.0.zst  (448097201 bytes)

Do not use it. extra/core-api is not something fbuild needs from the archive, because fbuild already provides ArduinoCore-API itself. From silabs_core.rs:

async fn ensure_installed(&self) -> fbuild_core::Result<PathBuf> {
    if self.is_installed() {
        let root = self.resolved_dir();
        super::arduino_api::ensure_arduino_api(&root.join("cores").join("silabs")).await?;
        return Ok(root);
    }
    let install_path = self.base.staged_install(Self::validate).await?;
    let root = find_core_root(&install_path);
    super::arduino_api::ensure_arduino_api(&root.join("cores").join("silabs")).await?;
    Ok(root)
}

ensure_arduino_api() fetches arduino/ArduinoCore-API@1.5.2 and installs it into cores/silabs/api/, keyed on the api/ArduinoAPI.h marker. That is where the silabs build reads the API from. The upstream extra/core-api submodule is redundant by design, which is exactly why these boards built fine for months with the directory empty.

So swapping in the release asset would mean pulling 448 MB per cold install to populate a directory nothing reads, and the current 401 MB source archive is already the largest package fbuild fetches.

This is the check's blind spot, not the package's

#1401 fires on the package rather than on use. Its own PR text says the alternative — "a declared submodule whose directory is missing entirely is not reported" — was chosen deliberately. But there is no third state for "declared, empty, and knowingly supplied another way," which is what silabs is.

I filed a separate issue for that escape hatch; it is the cheap and correct fix here. Once it exists, silabs needs one line declaring extra/core-api expected-empty, with a pointer to ensure_arduino_api.

Recommendation

  1. Add the escape hatch (companion issue).
  2. Declare extra/core-api knowingly-unpopulated for silabs-core, referencing ensure_arduino_api.
  3. Do not switch to silabs_arduino_core-2.2.0.zst.

Cross-ref: #1420 covers the ch32v case, which fails the same way but needs a different remedy — openwch publishes no release asset at all.

Activity

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