Commit Graph
3372 Commits
Author SHA1 Message Date
J. Nick Koston 84d98a3593 Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-21 16:52:50 -05:00
J. Nick Koston bf3972cbf6 Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-21 16:52:50 -05:00
J. Nick Koston 2ecf7af416 Name malformed manifests, diff drop-warnings by node key, surface bundled deps
A non-dict manifest or build section raises an EsphomeError naming the
library instead of an AttributeError. ConvertedLibrary remembers the
request-side node key it resolved from, so the converter-drop warning
diffs requests against those keys; a bare name resolving to a canonical
owner__pkg is no longer falsely listed missing. A bundled library whose
manifest declares dependencies warns that the walk never runs for it (a
no-op on the ESP8266 core, not on every core this module serves).
2026-08-21 16:52:32 -05:00
J. Nick Koston 114302b518 Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-21 15:34:01 -05:00
J. Nick Koston e2d0ebbd6e Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-21 15:34:01 -05:00
J. Nick Koston be2395da66 Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend 2026-08-21 15:34:00 -05:00
J. Nick Koston cbf1241401 Resolve the ccache path on every call, matching the espidf backend
functools.cache froze the ESPHOME_CCACHE_ENABLE/PATH decision for the
process lifetime, which a long-lived host like device-builder never
restarts, and forced a cache_clear fixture in the tests. The docstring
and test now pin the uncached delegation.
2026-08-21 15:33:51 -05:00
J. Nick Koston 568885f80d Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-21 15:19:11 -05:00
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 ccaa2a8f0d Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-21 14:32:37 -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 a3b2954321 Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-21 14:12:33 -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 046c7e5eb0 Lex build flags once in write_project, warn on unflags that match nothing
The pre-lexed tokens feed both _flag_defines and _project_flags so a
malformed entry warns once per generation. An unflag that hits nothing
in the user flags or any framework set (a typo, or -DUSE_FOO against
-DUSE_FOO=1) is named instead of silently leaving the flag in force.
2026-08-21 13:33:11 -05:00
J. Nick Koston c0cd64cd76 Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-21 13:32:21 -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 82d1ffebf2 Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 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 9153f03c83 Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission
# Conflicts:
#	tests/unit_tests/build_gen/test_arduino8266.py
2026-08-21 13:07:03 -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 e9409f46db Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 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 debfff005b Check the elf2bin inputs at generation, quote cxx flags, add d1_wroom_02 to BOARDS
elf2bin.py and eboot.elf join the existence checks so a half-extracted
package fails by name before the compile instead of at the
second-to-last edge. get_project_cxx_compile_flags() values go through
_shell_token like every other flag source. d1_wroom_02 (2 MB, in
ESP8266_BOARD_BUILD and buildable under PlatformIO) joins BOARDS so the
native board guard stops rejecting it, and the guard comment states
what config validation actually checks.
2026-08-21 12:57:36 -05:00
J. Nick Koston 523150a4c9 Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission
# Conflicts:
#	tests/unit_tests/build_gen/test_arduino8266.py
2026-08-21 12:55:51 -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 afe12061d2 Track the per-platform shell quoting in the emission drift tests
The asm -D/-I filter also strips a leading single quote now that POSIX
tokens are single-quoted.
2026-08-21 12:28:11 -05:00
J. Nick Koston 2d89ca3dd0 Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission
# Conflicts:
#	tests/unit_tests/build_gen/test_arduino8266.py
2026-08-21 12:26:46 -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 3e218e43cd Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 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 6093f3f1ce Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 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