Repository navigation
feat(toolchain): pin the ESP-IDF v5.5.1 source tree as an fbuild package - #1978
Merged
Merged
Conversation
The tool components merged in #1975/#1976 are only half of what a delegated idf.py build needs; the subprocess also has to be an ESP-IDF checkout with its 23 submodule contents. This installs the pinned commit's own archive plus one sha256-pinned archive per gitlink through the existing SubmodulePlan, so no git and no install.sh are involved. Measured: 108.1 MB of downloads (61.1 main + 47.0 submodules) and a 449,952,002 B tree, versus 603 MB for a recursive shallow clone and 1,414 MB for the release zip, which embeds .git/.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This was referenced Nov 10, 2026
This was referenced Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1975/#1976 (part of #1970). The tool components are already merged; a delegated
idf.pybuild (#1971) also needs to be an ESP-IDF checkout, and #1970's scope names "IDF source" as one of the pinned packages.What this adds
crates/fbuild-toolchain/src/toolchain/esp_idf_source.rs: the pinned ESP-IDF v5.5.1 source tree as one fbuild package, installed with nogitand noinstall.sh.EspIdfSource:install_path()/is_installed()/ensure_normalized()overPackageBase, cache keyesp-idf-v5.5.1/source, versionv5.5.1+fcae3288…— the release is part of the key and the leaf, so two IDF versions install side by side (setup action: fbuild cache restore-keys fallback crosses fbuild versions and doubles the saved cache #1843/fix(ci): scope the setup action's fbuild caches to one fbuild content hash (#1843) #1844 rule, feat(toolchain): pin an ESP-IDF release as fbuild packages with an esp32s3-only install profile #1970 AC3).IDF_SUBMODULES: all 23 gitlinks of the pinned commit (git ls-tree fcae3288, mode160000), each pinned to its own commit archive with a measured sha256 and byte count.SubmodulePlanmachinery (ch32v-core is fetched without its TinyUSB submodule — all 9 CH32V boards are red #1420): each archive is sha256-verified, extracted with its single top-level directory stripped into the gitlink path, and the plan is cross-checked against the extracted.gitmodules, so a moved submodule fails the install instead of producing a tree that compiles until it hits a missing third-party header.is_installed()additionally requires five markers (incl.components/mbedtls/mbedtls/CMakeLists.txt), so a cache restored mid-way is repaired, not trusted.Why not the two "obvious" sources (measured 2026-11-09, v5.5.1
fcae3288)esp-idf-v5.5.1.ziprelease asset.git/(verified through the zip central directory, 32,664 entries) — not a packagegit clone --depth 1+ 23 submodule checkoutsgita provisioning dependencyThe commit archive is the pinned commit's own tree, so it is the release rather than a summary of it: all 24 digests were re-downloaded and reproduced on the same day.
Measured
du -sb, whole tree incl. all submodules) — recorded asIDF_SOURCE_EXTRACTED_BYTES.tools/cmake/version.cmakedeclares 5.5.1,version.txtis optional andidf_tools.pyfalls back toesp_idf_version.h.Proof (real output)
Unit:
soldr cargo test -p fbuild-toolchain --lib esp_idf_source→ 7 passed; 0 failed; 1 ignored.Ignored end-to-end (
--ignored esp_idf_source_tree), really executed: 1 passed in 76.65 s — downloads 24 archives, verifies all 24 sha256s, extracts, populates all 23 submodules, asserts every.gitmodulespath is non-empty, assertsversion.cmakesays 5.5.1/5/1, and a secondensure_normalized()is a no-op cache hit (#1970 AC4).Gates:
soldr clippy --workspace --all-targets -- -D warningsclean,soldr cargo fmtclean, boundary44/43,check_test_layout.pyok,check_dylint_allowlists.pyok.Not in this PR (deliberately)
requirements.core.txt+ venv bootstrap, 57 MB) — next unit, and the last input feat(espidf): opt-in delegating idf.py build producing <build>/idf/ artifacts #1971 needs.EspIdfRelease::install()— additive next step; this PR keeps the tool profile untouched.