Commit Graph
3133 Commits
Author SHA1 Message Date
J. Nick Koston 315abf21f8 Merge branch 'esp8266-native-toolchain-plumbing' into esp8266-native-build-infra 2026-08-22 11:37:21 -05:00
J. Nick Koston 24e5b1800f Trim comment essays and hoist function-local test imports 2026-08-22 11:37:16 -05:00
J. Nick Koston 11eca53a18 Merge branch 'esp8266-native-build-surgery' into esp8266-native-toolchain-plumbing 2026-08-22 11:35:41 -05:00
J. Nick Koston f08e06f574 Trim comment essays and hoist function-local test imports 2026-08-22 11:35:35 -05:00
J. Nick Koston 27f4db8458 Merge branch 'esp8266-native-shared-helpers' into esp8266-native-build-surgery 2026-08-22 11:34:57 -05:00
J. Nick Koston e99e0cc8b8 Trim comment essays and hoist function-local test imports 2026-08-22 11:34:32 -05:00
J. Nick Koston db0e52a36b Cover shell_token's Windows branch on the coverage-uploading runner 2026-08-21 21:01:37 -05:00
J. Nick Koston 7298eed5b3 Merge branch 'esp8266-native-toolchain-plumbing' into esp8266-native-build-infra 2026-08-21 20:27:43 -05:00
J. Nick Koston d8c02221cc Route board_build.ldscript through to the native ESP8266 generator too
Published configs override it to reserve a filesystem region
(SmartIntercom's eagle.flash.4m2m.ld) or to correct a board's assumed
flash size (2 MB ESP8285 plugs pinning eagle.flash.2m.ld); dropping it
changes the flash layout under them.
2026-08-21 20:27:33 -05:00
J. Nick Koston 76d8c9eb46 Merge branch 'esp8266-native-toolchain-plumbing' into esp8266-native-build-infra 2026-08-21 20:25:32 -05:00
J. Nick Koston 7fb18f395f Honor board_build.f_cpu under the native ESP8266 Arduino toolchain
Dropping it was a real regression: many published ESP8266 configs pin
board_build.f_cpu: 160000000L for timing-sensitive integrations
(MHI-AC-Ctrl documents the 160 MHz requirement in its example), and the
warn-and-drop left those devices at 80 MHz. The option now routes into
CORE.platformio_options under toolchain: arduino for the generator to
consume; other native toolchains keep the warning.
2026-08-21 20:25:23 -05:00
J. Nick Koston e3d29e9fff Name a non-list registry system field instead of a TypeError
file["system"] normalized None and str but let an int or dict fall
through to the in test, where an int raises TypeError and a dict
becomes a key test; both now raise the same Unexpected-response error
as the other shape guards.
2026-08-21 15:18:54 -05:00
J. Nick Koston 45cbe0aa4b Parse IDF_CCACHE_ENABLE strictly through the shared helper, fix the ccache docstrings
parse_enable_env carries the 1/true/yes/on and 0/false/no/off table for
both knobs, so IDF_CCACHE_ENABLE=off disables instead of reading as
truthy and suppressing the shared opt-out. The ccache module docstring
and the ESP-IDF _ccache_env docstring now describe the precedence this
PR actually ships, and the probe test duplicated by the helper move is
dropped from the PlatformIO toolchain tests.
2026-08-21 13:12:57 -05:00
J. Nick Koston 0f7cd3fada Single-quote POSIX shell tokens, share the tool probe, harden registry checks
shell_token now picks the quoting style per platform: single quotes on
POSIX (sh expands nothing inside them, so backslash runs, $VAR, and
backticks reach the compiler exactly as lexed, matching SCons's
no-shell spawn) and the CreateProcess argv rule on Windows. A test
round-trips every case through a real /bin/sh.

The ninja and ccache runnability probes collapse into one
tool_version_runs helper in framework_helpers. The registry names a
non-dict top-level payload like the inner guards, and the expect layout
check also runs on marker hits so a marked install that later lost
files fails by name. The ESP-IDF ccache gate defers to
resolve_ccache_path so ESPHOME_CCACHE_ENABLE=0 disables ccache there
too, with IDF_CCACHE_ENABLE still taking precedence.
2026-08-21 12:25:03 -05:00
J. Nick Koston 510f667bd1 Merge branch 'esp8266-native-toolchain-plumbing' into esp8266-native-build-infra 2026-08-21 11:14:35 -05:00
J. Nick Koston c93cf55967 Skip the cache refresh when the CLI toolchain differs from the compile's
Platforms normalize toolchain-sensitive keys differently (the esp32
board name, for one), so a config validated under a mismatching
--toolchain must not overwrite the cache while the sidecar keeps the
compile's toolchain. The guard lives in _refresh_sidecar where the old
sidecar is already loaded; legacy sidecars without the field are
unaffected.
2026-08-21 11:14:26 -05:00
J. Nick Koston efe1b0e744 Merge branch 'esp8266-native-toolchain-plumbing' into esp8266-native-build-infra 2026-08-21 09:58:44 -05:00
J. Nick Koston 6cb446baf8 State what the cache refresh actually writes
The comment claimed the refresh's sidecar records the CLI toolchain;
_refresh_sidecar returns early when a compile-written sidecar exists,
so the compile's toolchain stands. Reword the comment and the test
docstring to match.
2026-08-21 09:58:32 -05:00
J. Nick Koston 0fa081cd80 Name malformed registry elements, parse ESPHOME_CCACHE_ENABLE strictly, require a package layout check
Registry version and file entries that are not dicts now raise the same
Unexpected-response error as the other shape guards instead of an
AttributeError traceback. install_package rejects an empty expect so
every install is layout-validated before the marker is written.
ESPHOME_CCACHE_ENABLE values outside 1/true/yes/on and 0/false/no/off
warn and are treated as unset instead of bool(str) flipping them to
enabled. The strip_win_long_path_prefix test moved next to the function
in test_framework_helpers, and a stale comment naming its old module is
fixed.
2026-08-21 09:58:16 -05:00
J. Nick Koston 225c62dbf1 Merge branch 'esp8266-native-toolchain-plumbing' into esp8266-native-build-infra 2026-08-21 01:05:51 -05:00
J. Nick Koston 8b9773c4bd Gate only the cache read on an explicit CLI toolchain, keep the refresh
The upload/logs cache split: an explicit --toolchain still skips the
read and runs the per-platform validators, but the freshly validated
config is saved again so a later plain run keeps the fast path (the
sidecar records the resolved toolchain). check_supported_toolchain is
module-private now since it has no caller outside config_validation,
and require_platformio_toolchain's docstring describes what actually
happens when another platform's toolchain is passed.
2026-08-21 01:05:38 -05:00
J. Nick Koston 18a2aa2097 Probe the PATH ninja, chain import errors, harden registry payload checks, honest ccache docstring 2026-08-20 23:53:40 -05:00
J. Nick Koston 6ed01b06c3 Merge branch 'esp8266-native-toolchain-plumbing' into esp8266-native-build-infra 2026-08-20 23:47:51 -05:00
J. Nick Koston 24eb6354f9 Run validators when a CLI toolchain is given on the cache fast path, cover every LibreTiny family 2026-08-20 23:47:47 -05:00
J. Nick Koston f5ac480dff Merge branch 'esp8266-native-toolchain-plumbing' into esp8266-native-build-infra 2026-08-20 22:08:43 -05:00
J. Nick Koston 19555e8eaf Merge branch 'esp8266-native-build-surgery' into esp8266-native-toolchain-plumbing 2026-08-20 22:08:43 -05:00
J. Nick Koston d47dc0d992 Pin fingerprint stability and sensitivity behaviorally, note the platform pairing 2026-08-20 22:08:41 -05:00
J. Nick Koston b0a214830a Merge branch 'esp8266-native-toolchain-plumbing' into esp8266-native-build-infra 2026-08-20 21:09:43 -05:00
J. Nick Koston 38744e4222 Merge branch 'esp8266-native-build-surgery' into esp8266-native-toolchain-plumbing 2026-08-20 21:09:43 -05:00
J. Nick Koston 9624abcd57 Merge branch 'esp8266-native-shared-helpers' into esp8266-native-build-surgery 2026-08-20 21:09:42 -05:00
J. Nick Koston 2c229debe8 Best-effort bad encodings, dedupe append warnings, tolerate structurally odd compile DBs 2026-08-20 21:09:38 -05:00
J. Nick Koston 378a01a838 Merge branch 'esp8266-native-toolchain-plumbing' into esp8266-native-build-infra 2026-08-20 20:53:31 -05:00
J. Nick Koston e266a449e0 Merge branch 'esp8266-native-build-surgery' into esp8266-native-toolchain-plumbing 2026-08-20 20:53:31 -05:00
J. Nick Koston 6a0ce046fd Merge branch 'esp8266-native-shared-helpers' into esp8266-native-build-surgery 2026-08-20 20:53:31 -05:00
J. Nick Koston 6b6344b454 Cover the healthy post-compile idedata path 2026-08-20 20:53:30 -05:00
J. Nick Koston a56c465d6d Merge branch 'esp8266-native-toolchain-plumbing' into esp8266-native-build-infra 2026-08-20 20:48:32 -05:00
J. Nick Koston b3d908d10e Merge branch 'esp8266-native-build-surgery' into esp8266-native-toolchain-plumbing 2026-08-20 20:48:32 -05:00
J. Nick Koston 09fd3fb53b Merge branch 'esp8266-native-shared-helpers' into esp8266-native-build-surgery 2026-08-20 20:48:32 -05:00
J. Nick Koston 73ab04330e Treat sys.exit(0) as script success, fail on an unreadable declared script 2026-08-20 20:48:30 -05:00
J. Nick Koston 57b69cae81 Merge branch 'esp8266-native-toolchain-plumbing' into esp8266-native-build-infra 2026-08-20 20:46:30 -05:00
J. Nick Koston 9fccf1ce33 Merge branch 'esp8266-native-build-surgery' into esp8266-native-toolchain-plumbing 2026-08-20 20:46:30 -05:00
J. Nick Koston b8bb4453e0 Merge branch 'esp8266-native-shared-helpers' into esp8266-native-build-surgery 2026-08-20 20:46:30 -05:00
J. Nick Koston 91eed262c8 Repr zero-arg script exceptions, surface a None idedata after an IDF build 2026-08-20 20:46:15 -05:00
J. Nick Koston ec8437fea2 Quote empty tokens, honest docstrings, strict registry payloads, required layout checks, honest patch targets 2026-08-20 20:38:09 -05:00
J. Nick Koston 8513dfeebd Merge branch 'esp8266-native-toolchain-plumbing' into esp8266-native-build-infra 2026-08-20 20:36:32 -05:00
J. Nick Koston b42babf749 Route platformio build_unflags natively, correct the gate and fallback comments 2026-08-20 20:35:49 -05:00
J. Nick Koston e1c4984498 Merge branch 'esp8266-native-build-surgery' into esp8266-native-toolchain-plumbing 2026-08-20 20:34:25 -05:00
J. Nick Koston 3063b9067a State what the fingerprint test actually pins 2026-08-20 20:34:24 -05:00
J. Nick Koston b7a3181d13 Merge branch 'esp8266-native-toolchain-plumbing' into esp8266-native-build-infra 2026-08-20 19:51:28 -05:00
J. Nick Koston 1958746ae0 Merge branch 'esp8266-native-build-surgery' into esp8266-native-toolchain-plumbing 2026-08-20 19:51:28 -05:00