fix(build): fail oversize images, compile only reached lib/ libraries, warn on ignored version pins - #1473
Merged
Conversation
|
Warning Review limit reachedNext included review available in 6 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: FastLED/fbuild/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (18)
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. Comment |
…, warn on ignored version pins Fixes #1407, #1409, #1410. #1409: an image that cannot fit the target linked and exited 0 (Uno at 135% flash / 2059% RAM). `Linker::link_all` now fails when flash exceeds the board maximum (PlatformIO `checkprogsize` / arduino-cli semantics) on both the fresh-link and skip-relink paths. RAM overflow is fatal on AVR, where data+bss is exactly its single SRAM, and a visible warning elsewhere (multi-region MCUs over-count). Bloat analysis keeps accepting oversize images. ESP32 checks against the app partition from the partitions CSV (factory, else ota_0), as PlatformIO does, instead of the chip flash size most ESP32 board JSONs carry. #1410: every lib/ directory was compiled regardless of includes, so a SAMD-only library broke AVR builds. `select_local_libraries` runs the LDF walk (textual, so compiler-builtin guards cannot drop a needed library) from project sources; lib_deps names force selection. Both the generic and ESP32 pipelines compile only the selection, and only selected local libraries seed framework-library selection. #1407: `platform = name@version` and bare `platform_packages` version pins were dropped silently. They now produce a warning in the build output naming the ignored pin and the URL form that is honored.
The guards triggered an editable build of fbuild through its pinned soldr build backend, whose daemon collided with the newer broker setup-soldr started, failing ci-minimal on main and every PR.
zackees
force-pushed
the
fix/stevenmunn-issues-1407-1409-1410
branch
from
September 26, 2026 08:56
03cbdc5 to
82171de
Compare
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.
Fixes #1407, fixes #1409, fixes #1410.
#1409 — oversize firmware exited 0
Linker::link_allcallsenforce_size_limitsafter sizing, on both the fresh-link and the skip-relink path. Flash over the board maximum fails the build with PlatformIO'scheckprogsizewording.AvrLinker::ram_overflow_is_fatal), wheredata + bssis exactly the single SRAM, matching arduino-cli. Elsewhere it is aWarning!line in the size report, as in PlatformIO, becausedata + bssover-counts on multi-region MCUs (Teensy 4 DMAMEM/EXTMEM).bloat_analysisbuilds (--noinhibit-exec) still accept oversize images, since that mode exists to analyze them.weactstudio_esp32c3coreboard: 393216).max_flashstill drives esptool--flash-size, so this uses a separatewith_app_size_limit.#1410 — every
lib/library was compiledframework_libs::select_local_librariesruns the LDF walk from project translation units overlib/*, following library-to-library edges.lib_depsnames force selection (newfbuild_library_select::resolve_declared).#ifarm is scanned). The active scan treats compiler builtins (__XTENSA__,__AVR__) as defined nowhere and could drop a library the compiler includes. The textual walk can only over-select, and over-selecting is what the old behavior did for every library.src/, the sketch-root walk no longer seeds fromlib/.#1407 — version pins were ignored silently
fbuild_config::ignored_version_pinsflagsplatform = name@versionand bareplatform_packages = name@versionentries.BuildContextwrites them to the build output. The existing ESP32 warning only reached the daemon log viatracing. Each warning names the URL form that is honored.Validation
SizeInfo::{flash,ram}_overflow,enforce_size_limits, partition CSV parsing,ignored_version_pins, and six local-lib selection cases (the report's layout, a transitive local lib, a builtin-macro guard, lib_deps, a sketch at the project root, and an unselected lib not seeding framework selection).bash testpasses and clippy-D warningsis clean.FBUILD_DEV_MODE=1):The program size (43662 bytes) is greater than maximum allowed (32256 bytes); The data size (42184 bytes) ..., exit 1. The second run, which skips the relink, also fails. A RAM-only overflow (6184/2048) fails too.lib/FastLED+ a SAMD-only lib that includes<malloc.h>, Uno): fbuild 2.5.22 fails with the exactmalloc.herror from the report. This branch builds (4.6 KB flash). On ESP32 onlylib/FastLEDis compiled.platformand inplatform_packages#1407:platform = espressif32@6.5.0plusplatform_packages = platform-espressif32@6.5.0prints both warnings in the build output. ESP32 flash now reports against 1.25 MB (default.csv) or 3.00 MB (huge_app.csv).