Skip to content

Sever root platformio.ini merge from CI compile path (#3274 Phase 2) #3278

Closed

Description

@zackees

Phase 2 of #3274.

Blocked on Phase 1: PRs #3276 (PARLIO IRAM) and #3277 (monitor_filters + check_tool) MUST merge first. Without them, severing the root merge silently drops the ESP32 exception decoder and PARLIO ISR placement.

Reproduction (current state)

Root ./platformio.ini is silently merged into every firmware build via ci/compiler/pio.py:155 → ci/compiler/build_config.py:33-89 get_root_platformio_build_flags. The leak fires for every backend (fbuild, PIO, autoresearch, bash debug, bloat, regression tests) — it is NOT PioCompiler-specific. Symptom of record: PR #3268, where inherited debug flags from [env:generic-esp] doubled the esp32dev binary and forced manual -UDEBUG / -DNDEBUG / -Os band-aids inside [env:esp32dev].

Fixed when

  1. PioCompiler.__init__ gains merge_root_platformio: bool = False. Default False.
  2. _init_platformio_build at ci/compiler/pio.py:155 only calls get_root_platformio_build_flags when the parameter is True.
  3. Call sites flipped:
    • ci-compile.py (interactive bash compile): explicit merge_root_platformio=False.
    • compile_board_examples (CI orchestrator): merge_root_platformio=False.
    • ci/autoresearch/build_driver.py: merge_root_platformio=False (autoresearch is 100% boards.py-driven today; no behavior change).
    • ci/debug_attached.py (bash debug): merge_root_platformio=False by default. Opt-in via a new bash debug --use-root-ini flag if a user needs it.
  4. Deprecation telemetry (optional safety net): add FASTLED_FAIL_ON_ROOT_MERGE=1 env var that, when set, makes a non-empty merge raise instead of merge. CI workflows set it. This is the canary that catches any flag we missed in Phase 1.
  5. Validation: bash compile esp32c6 --examples Blink produces a binary identical to today's esp32c6 build (since Phase 1 ported the only flags actually being merged in). bash compile esp32dev --examples Blink no longer needs PR fix(ci/size): esp32dev overrides generic-esp debug flags (restore 330KB ceiling) #3268's -UDEBUG / -DNDEBUG / -Os overrides — they can be removed in Phase 3.

Out of scope

  • Removing the band-aids in [env:esp32dev] (Phase 3 cleanup).
  • Deleting get_root_platformio_build_flags (Phase 3 cleanup).
  • Deprecating PioCompiler (Phase 3).
  • Modifying root platformio.ini (orthogonality rule).

Refs

Blocks: #3274 Phase 3 (#TBD)
Blocked on: PR #3276, PR #3277
Parent: #3274

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