Commit Graph
17613 Commits
Author SHA1 Message Date
J. Nick Koston aa2cd99a9b Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-22 12:52:53 -05:00
J. Nick Koston 478584354e Merge branch 'esp8266-native-build-infra' into esp8266-native-framework-installer 2026-08-22 12:52:52 -05:00
J. Nick Koston 53228c183a Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend 2026-08-22 12:52:52 -05:00
J. Nick Koston 9c7f68b813 Hoist the boolean spelling tables to helpers so cv.boolean and the env parser share one source
cv.boolean's inline tuples and the ccache env tables were two copies of
the same spellings; TRUTHY_BOOL_STRINGS/FALSY_BOOL_STRINGS now live in
esphome/helpers.py, cv.boolean consumes them, and parse_enable_env
derives its tables by adding the 1/0 env convention.
2026-08-22 12:52:38 -05:00
J. Nick Koston fe357106df Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-22 12:48:21 -05:00
J. Nick Koston 751914c47f Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain 2026-08-22 12:48:21 -05:00
J. Nick Koston f4f7492f37 Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-22 12:48:21 -05:00
J. Nick Koston ef6c609e93 Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend
# Conflicts:
#	tests/unit_tests/test_platformio_library.py
2026-08-22 12:47:48 -05:00
J. Nick Koston b62d59ca26 Merge branch 'esp8266-native-build-infra' into esp8266-native-framework-installer 2026-08-22 12:47:07 -05:00
J. Nick Koston e52703617e Name the env boolean spelling tables like device-builder does
parse_enable_env's inline tuples become TRUTHY_ENV_STRINGS and
FALSY_ENV_STRINGS frozensets mirroring cv.boolean's spellings (enable
and disable included) plus the 1/0 env convention, matching
device-builder's TRUTHY_BOOL_STRINGS pattern.
2026-08-22 12:47:05 -05:00
J. Nick Koston 57cbadbe9f Merge branch 'esp8266-native-toolchain-plumbing' into esp8266-native-build-infra 2026-08-22 12:46:30 -05:00
J. Nick Koston a6ca775a48 Merge branch 'esp8266-native-shared-helpers' into esp8266-native-build-surgery 2026-08-22 12:46:29 -05:00
J. Nick Koston 315f41e884 Merge branch 'esp8266-native-build-surgery' into esp8266-native-toolchain-plumbing 2026-08-22 12:46:29 -05:00
J. Nick Koston 65609bb94b Move the backend-agnostic library hardening down from the arduino backend PR
The typed IncompatiblePlatform exception, dependency_is_usable,
warn_properties_depends, the lex_build_flags helper (espidf switches to
it), the normalize_dependencies validation, the manifest shape check,
the component-level drop-warning split, and the SCons case-sensitive
.C/.C++ suffixes all harden the shared converter independently of the
arduino backend, so they belong in this PR; the provides hook and the
version-less reconciliation stay with the backend that needs them.
2026-08-22 12:46:16 -05:00
J. Nick Koston 09a875f359 Refactor the library backend into focused functions
build_tool gains one function per mode plus a shared rspfile reader.
_library_info becomes an orchestrator over _resolve_src_dir,
_resolve_lib_archive, _classify_build_flags, _resolve_include_dirs, and
_collect_lib_sources. The version-less reconciliation moves into
_warn_unsatisfied_versionless. _is_safe_library_name switches from a
character denylist to a filename-plain allowlist, which excludes
separators, drive colons, and dot-only names by shape.
2026-08-22 12:43:04 -05:00
J. Nick Koston 43411106bb Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-22 12:26:39 -05:00
J. Nick Koston e107747643 Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain 2026-08-22 12:26:39 -05:00
J. Nick Koston 01f7373d51 Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-22 12:26:39 -05:00
J. Nick Koston 6bdec7e907 Warn only for source-like suffix drops, batch ar argv, name non-iterable dependencies
The unmapped-suffix warning fired for every header-only library (the
default +<*> filter matches headers), so ArduinoJson would have warned
on every ESP8266 build. It now names exactly the source-like files
(.CPP, .ino and case-variants of the map) the case-sensitive suffix map
rejects, partial drops included, and stays quiet for headers and
metadata.

The ar shim batches the expanded object list by argv length (rc then q
appends), keeping the command line under the Windows 32767-char limit
the rspfile existed to avoid. A non-iterable dependencies value in a
manifest now warns by library name instead of raising a bare
TypeError.
2026-08-22 12:26:24 -05:00
J. Nick Koston e41440b16b Tilde-expand the install prefix before the CI cache-path assertion
The job env carries a literal ~ that Python's expanduser and
actions/cache both resolve; the assertion compared the raw string and
failed the native toolchain job.
2026-08-22 12:23:24 -05:00
J. Nick Koston 19d8f832b9 Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain
# Conflicts:
#	esphome/components/esp8266/__init__.py
2026-08-22 12:16:27 -05:00
J. Nick Koston d7edb52c7b Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-22 12:15:40 -05:00
J. Nick Koston 4a1138820d Merge branch 'esp8266-native-build-infra' into esp8266-native-framework-installer 2026-08-22 12:15:39 -05:00
J. Nick Koston 2ab0dc4e4f Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-22 12:15:39 -05:00
J. Nick Koston bbcc9f690a Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend 2026-08-22 12:15:39 -05:00
J. Nick Koston 7c07276c71 Merge branch 'esp8266-native-toolchain-plumbing' into esp8266-native-build-infra 2026-08-22 12:15:38 -05:00
J. Nick Koston 60cf44de3b Merge branch 'esp8266-native-shared-helpers' into esp8266-native-build-surgery 2026-08-22 12:15:38 -05:00
J. Nick Koston 072b65c0e2 Merge branch 'esp8266-native-build-surgery' into esp8266-native-toolchain-plumbing 2026-08-22 12:15:38 -05:00
J. Nick Koston f71867ed2d Merge remote-tracking branch 'origin/dev' into esp8266-native-shared-helpers 2026-08-22 12:15:30 -05:00
J. Nick Koston 8b7d199ff9 Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain 2026-08-22 12:08:57 -05:00
J. Nick Koston e7aa269346 Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-22 12:08:57 -05:00
J. Nick Koston 3037ed0a28 Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-22 12:08:57 -05:00
J. Nick Koston c206f83528 Make the remaining silent drops visible across backends
The depends=-without-dependencies warning moves into the shared walk so
espidf builds report it too; the arduino backend keeps it only for
bundled libraries the walk never sees. Version-less dependencies now
pass the platform filter before the reconciliation records them, so a
platform-excluded entry no longer draws a spurious drop warning.

A converted library whose matched files all fall through the source
suffix map warns instead of silently producing an empty archive, and
unhonored precompiled/ldflags properties fields warn by library name.
The ar rspfile parser undoes ninja's POSIX inner-quote escape and the
module docstring records the one-object-per-line contract. The
includeDir comment now states that warn-and-drop is intended.
2026-08-22 12:08:46 -05:00
J. Nick Koston b002a37987 Fail fast on empty compile databases and unsupported analyze-memory toolchains; degrade a missing size tool
ninja -t compdb exits 0 with an empty list when the rule names drift, so
the compile database is now parsed and an empty result fails the build
and drops the stale file. analyze-memory refuses an unsupported
toolchain before paying for the compile. A missing size binary warns
instead of discarding an already-linked build, _parse_app_size returns
explicitly from its not-found branch, and the CI cache action asserts
the caller's install prefix matches the cached path. The esp8266
run_compile dispatch hook and copy_files early-return gain direct
tests.
2026-08-22 12:06:38 -05:00
J. Nick Koston 583f47034f Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain 2026-08-22 12:02:36 -05:00
J. Nick Koston 10a22d7d74 Quote an overridden ldscript name on the link line; note the deliberate board-derived --flash_size
The -T script name was the one user-controlled token on the link line
that skipped shell_token, so a space or dollar sign in a
board_build.ldscript override corrupted the emitted linkflags. The
elf2bin comment now records that --flash_size deliberately stays
board-derived, matching PlatformIO (which reads upload.maximum_size,
not the ldscript).
2026-08-22 12:02:33 -05:00
J. Nick Koston 905b056756 Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission
# Conflicts:
#	esphome/build_gen/arduino8266.py
2026-08-22 12:01:44 -05:00
J. Nick Koston dc1bbac385 Harden the build spec: content-hashed ld cache, strict f_cpu, loud diagnostics
The linker-script stamp now records the sha256 of the written content, so
an externally edited or truncated cached script regenerates instead of
passing a SECTIONS substring probe, and a non-UTF-8 cached script is
overwritten by the regeneration instead of aborting it. The cached
preprocessor diagnostic re-emit no longer swallows its own read failure.

board_build.f_cpu is validated (digits with an optional L) before landing
unquoted on the compile line, _pio_option rejects empty and blank values
instead of silently reverting to the default, and user MMU define bodies
re-quote through shell_token like every other user token. The plain-form
linker denylist is a named constant the _project_flags docstring points
at, so the two cannot drift.
2026-08-22 12:01:08 -05:00
J. Nick Koston b597a4f02f Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain 2026-08-22 11:55:59 -05:00
J. Nick Koston 0c64ce7a8c Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-22 11:55:59 -05:00
J. Nick Koston ba521acdab Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-22 11:55:59 -05:00
J. Nick Koston 9676e0c0f0 Merge branch 'esp8266-native-build-infra' into esp8266-native-framework-installer 2026-08-22 11:55:58 -05:00
J. Nick Koston cedecf1f83 Merge branch 'esp8266-native-toolchain-plumbing' into esp8266-native-build-infra 2026-08-22 11:55:58 -05:00
J. Nick Koston e7d3c1b92b Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend 2026-08-22 11:55:58 -05:00
J. Nick Koston f28be76c84 Fix comment drift: conditional cache refresh, future-tense generator consumer 2026-08-22 11:55:15 -05:00
J. Nick Koston fcc7bb8c44 Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain 2026-08-22 11:49:37 -05:00
J. Nick Koston 3e646470ef Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-22 11:49:36 -05:00
J. Nick Koston ec9200912d Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-22 11:49:36 -05:00
J. Nick Koston 3242196f9c Validate shorthand dependencies, honor lib_ignore for version-less deps, warn on non-platform component drops
The dict-shorthand dependency form now runs the same name validation as
the list form, so an empty key or a spec overriding name with a
non-string warns instead of raising a bare TypeError from the key
builder. A lib_ignore'd version-less dependency is deliberately excluded
and no longer draws the reconciliation warning. The walk's
component-level InvalidLibrary handler mirrors dependency_is_usable:
cross-platform skips stay at debug, any other cause warns. A malformed
libArchive/dot_a_linkage value now fails naming the library like the
sibling build fields, and the suffix map gains SCons's case-sensitive .C
and .C++ so those sources compile as C++ instead of silently dropping
out of the archive.
2026-08-22 11:49:25 -05:00
J. Nick Koston 4866ef97f0 Trim comment essays and hoist function-local test imports 2026-08-22 11:46:49 -05:00