Commit Graph
3301 Commits
Author SHA1 Message Date
J. Nick Koston 17a251d062 Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-21 15:19:10 -05:00
J. Nick Koston ce87ca2e11 Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend 2026-08-21 15:19:10 -05:00
J. Nick Koston 33aea420ac Merge branch 'esp8266-native-build-infra' into esp8266-native-framework-installer 2026-08-21 15:19:10 -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 a2b28a8f8d Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-21 14:32:37 -05:00
J. Nick Koston e9f8233f67 Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend 2026-08-21 14:32:37 -05:00
J. Nick Koston c07a5a8da4 Match the encoder's lower bound to the PlatformIO era guard, drop the unused logger
<= 2.6.2 instead of < 2.6.3: a 2.6.2 pre-release sorts above 2.6.2 and
belongs to the package-major-3 encoding, so the helper now describes
the same set as _format_framework_arduino_version and a 2.6.2-b1 pin
formats as it does on dev. The module never logged, so its _LOGGER and
logging import go.
2026-08-21 14:32:27 -05:00
J. Nick Koston d07ed5b397 Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-21 14:12:33 -05:00
J. Nick Koston b4514e5af2 Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend 2026-08-21 14:12:33 -05:00
J. Nick Koston 93a768531d Anchor the 4.x error to the version key, bound the encoder, build PATH without empty entries
cv.Invalid now carries path=[CONF_VERSION] so the rejection lands on
the framework version line the comment promised, matching the esp32
convention. framework_package_version raises for cores before 2.6.3
instead of encoding them wrongly for a caller that skipped the
PlatformIO path's era guard. get_build_env joins PATH from filtered
parts so an absent PATH cannot leave a trailing separator that the
shell reads as the current directory.
2026-08-21 14:12:20 -05:00
J. Nick Koston 7c2254d8ee Refuse knob-plus-raw define splits, lex build flags once, harden the ld cache
A raw MMU_* define alongside a PIO_FRAMEWORK_ARDUINO_MMU_* knob, or a
raw TCP_MSS/LWIP_* alongside the lwIP knobs, would win the compile line
while the linker script or prebuilt library keeps the knob's values;
both now raise like the no-knob case. _MMU_VARIANTS holds tuples and the
resolved config gets a copy, so nothing aliases the module table.
_lexed_build_flags lexes once and both consumers accept the tokens, so
a malformed entry warns once per build. The linker-script stamp covers
the header's size and mtime, an unreadable or non-UTF-8 cache
regenerates instead of aborting, plain-form linker flags warn that they
are not routed to the link line, and a moved rate-table anchor surfaces
as a named build error.
2026-08-21 13:32:12 -05:00
J. Nick Koston 4898dc0800 Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend 2026-08-21 13:13:15 -05:00
J. Nick Koston e3cf2407ca Merge branch 'esp8266-native-build-infra' into esp8266-native-framework-installer 2026-08-21 13:13:15 -05:00
J. Nick Koston bfeb27cd2a Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-21 13:13:15 -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 84de74663c Cover the testing-mode flash-ld OSError guard 2026-08-21 13:06:33 -05:00
J. Nick Koston 937c69e420 Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend 2026-08-21 12:57:45 -05:00
J. Nick Koston 211889cfb6 Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-21 12:57:45 -05:00
J. Nick Koston 784cf6819f Refuse inconsistent memory-layout configs, validate the cached linker script
Unknown or conflicting VTABLES_IN_* defines raise instead of warning
and picking arbitrarily (a typo previously won the sorted pick and died
in the SDK header's #error). Custom MMU sizes without the CUSTOM knob
raise too: PlatformIO warns but its defaults win the compile line,
while here the user's tokens would win and compile against a layout the
linker script does not implement. The cached linker script is re-checked
for its SECTIONS block so a truncated file regenerates, the
testing-mode flash-ld read gets the same OSError guard as the gcc
spawn, the ParseFlags docstring states its actual coverage, and the ld
test mocks are quiet so the clean path asserts no warnings.
2026-08-21 12:55:23 -05:00
J. Nick Koston 4af70c3a4d Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-21 12:53:46 -05:00
J. Nick Koston 0cb307aea5 Type the platform rejection, prefer bundled deps, parse manifests strictly
check_library_data's platform filter raises IncompatiblePlatform (an
InvalidLibrary subclass) so the arduino backend branches on the type
instead of substring-matching the message. The {"Wire": "*"} dict
shorthand resolves to the bundled library like PIO's
process_dependencies instead of a registry lookup. libArchive parses
booleans and true/false strings and warns on anything else (bool(str)
made "false" archive). A declared-but-falsy srcDir raises instead of
silently probing. The converter-drop warning names the missing requests,
and the bundled-walk comment states what PIO actually does.
2026-08-21 12:53:39 -05:00
J. Nick Koston 1f1cab9c37 Anchor the 4.x rejection to the framework version line, isolate the ccache env test
The installer's EsphomeError becomes cv.Invalid at the config
validator, and test_ccache_env clears the ambient environment so a
developer's exported CCACHE_DIR cannot fail it.
2026-08-21 12:51:09 -05:00
J. Nick Koston a7febfbf05 Track the per-platform shell quoting in the requote drift test 2026-08-21 12:26:23 -05:00
J. Nick Koston 6d23a2c9e5 Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend 2026-08-21 12:25:14 -05:00
J. Nick Koston e12795c285 Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-21 12:25:14 -05:00
J. Nick Koston 85335de839 Merge branch 'esp8266-native-build-infra' into esp8266-native-framework-installer 2026-08-21 12:25:13 -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 78a41161cb Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend 2026-08-21 11:14:35 -05:00
J. Nick Koston 01600d0abd Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-21 11:14:35 -05:00
J. Nick Koston 653f9e8f2a Merge branch 'esp8266-native-build-infra' into esp8266-native-framework-installer 2026-08-21 11:14:35 -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 9bd83e5d2d Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend 2026-08-21 09:58:44 -05:00
J. Nick Koston 3a2bd29c15 Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-21 09:58:44 -05:00
J. Nick Koston f3f6fe8a7d Merge branch 'esp8266-native-build-infra' into esp8266-native-framework-installer 2026-08-21 09:58:44 -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 b8ce65282e Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend 2026-08-21 09:36:00 -05:00
J. Nick Koston 5587e34a8c Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-21 09:36:00 -05:00
J. Nick Koston 8fd8766167 Sandbox ESPHOME_ARDUINO8266_PREFIX in the writer test isolation fixture
The autouse fixture pinned the idf and sdk-nrf prefixes but not the new
arduino8266 one, so running the suite with that env var exported deleted
the pointed-to install. Also adds the clean_all removal test the other
two native installs already have.
2026-08-21 09:35:53 -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 bb77ad01eb Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend 2026-08-21 01:05:51 -05:00
J. Nick Koston 2da961f560 Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-21 01:05:51 -05:00
J. Nick Koston 0b0194cf41 Merge branch 'esp8266-native-build-infra' into esp8266-native-framework-installer 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 cd2ab6e78b Join unflag tokens, filter knobs by unflags, pin every table verbatim, guard degenerate ld output and empty lib flags 2026-08-20 23:57:45 -05:00
J. Nick Koston e5a7243b7b Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-20 23:55:47 -05:00
J. Nick Koston 662978c402 Name dropped requests and non-platform dependency rejections, correct the dot_a_linkage attribution 2026-08-20 23:55:38 -05:00
J. Nick Koston e6bf3e0e8f Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend 2026-08-20 23:55:19 -05:00