Commit Graph
3578 Commits
Author SHA1 Message Date
J. Nick Koston 266f67ef13 Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain 2026-08-22 11:04:48 -05:00
J. Nick Koston ee218bdc7d Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-22 11:04:47 -05:00
J. Nick Koston 5dea42d28a Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-22 11:04:47 -05:00
J. Nick Koston 57e738adf8 Simplify the library backend: share the dependency filter, drop the request-key drop diff, dedupe test scaffolding
Validate manifest shape once in the converter (every backend dereferences
data/build), share the InvalidLibrary filter as dependency_is_usable(),
and let the walk's reconciliation own version-less drop reporting so the
arduino backend's request-key diff, owner-no-version warning, and
node_key plumbing all go away. One memoized _provided() predicate now
answers bundled-name checks at all three sites. Tests gain shared
scaffold helpers and lose the assertions that pinned deleted messages.
2026-08-22 11:04:35 -05:00
J. Nick Koston 70b8573110 Move version-less drop reconciliation into the walk, harden the name guards
The shared walk now defers every version-less skip and reconciles after
emit against the final resolution set (request keys, resolved manifest
names, and backend.provides(name) per name), so drop visibility is
correct for every backend by construction instead of by a comment-level
contract, and the arduino backend's duplicate pending_drops pass and its
short-name suppression heuristics are deleted. The provides lambda
applies _is_safe_library_name so an unsafe manifest name is simply not
provided, and the guard also rejects drive-colon names that would
escape the tree on Windows.
2026-08-22 10:46:50 -05:00
J. Nick Koston 772fb65675 Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain 2026-08-22 10:03:46 -05:00
J. Nick Koston 116f7479a3 Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-22 10:03:46 -05:00
J. Nick Koston 40c28c3861 Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-22 10:03:45 -05:00
J. Nick Koston 735d4076c1 Keep the top-level suppression total and honest
The check guards URL-ish names before _node_key (a malformed entry
belongs to the drop warning, not a RuntimeError) and matches against
top_level_keys so the message says exactly what it verifies; a
transitive-only node can still fail compatibility later and must not
suppress the drop report.
2026-08-22 10:03:43 -05:00
J. Nick Koston 00549813ab Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain 2026-08-22 09:41:49 -05:00
J. Nick Koston c2e920d769 Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-22 09:41:49 -05:00
J. Nick Koston 69ab07ec41 Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-22 09:41:49 -05:00
J. Nick Koston a48fbd1cd1 Suppress the top-level-requested false positive, guard names once, fail empty bundled libraries
The walk's version-less warning stays quiet for a name the config also
requests top-level, and the provides-backend debug level carries the
ownership rationale (the arduino backend defers drops and suppresses
walk-resolved names this layer cannot know yet). _is_safe_library_name
guards both the top-level bundled check and manifest dependencies, so a
YAML libraries entry of '.' or a backslash name cannot join under the
framework tree. The drop suppression strips only the sanitized owner
prefix, keeping a library's own double underscores. An empty bundled
directory raises naming the fix instead of warning into an unlinkable
build, and the second real-converter test pins ESPHOME_DATA_DIR.
2026-08-22 09:41:35 -05:00
J. Nick Koston ccce5e9ab2 Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain 2026-08-22 09:30:02 -05:00
J. Nick Koston 3b9a026fd4 Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-22 09:30:02 -05:00
J. Nick Koston a4d99a8ee9 Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-22 09:30:02 -05:00
J. Nick Koston e47ec9acad Cover the routine version-less skip through the real walk 2026-08-22 09:29:49 -05:00
J. Nick Koston 685409cf83 Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain 2026-08-22 09:21:11 -05:00
J. Nick Koston bff4b7d870 Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-22 09:21:11 -05:00
J. Nick Koston 965557ee11 Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-22 09:21:10 -05:00
J. Nick Koston 8e6af6aa8c Name the manifest in every dependency diagnostic, warn where no backend can recover
normalize_dependencies' parameter is manifest_name (the dict branch
already binds owner to a package owner), and the arduino call site
passes the library's name so its unrecognized-entry warning stops
saying 'of manifest'. A version-less dependency warns when the backend
declares no provides tree (espidf/zephyr/nrf52 have no post-emit
pickup), and the shared walk mirrors the typed IncompatiblePlatform
branch: routine platform skips stay at debug, any other InvalidLibrary
cause warns naming the component. The two real-converter tests pin
ESPHOME_DATA_DIR to tmp_path so an ambient data dir cannot leak in.
2026-08-22 09:20:57 -05:00
J. Nick Koston 7c91407835 Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain 2026-08-22 00:48:41 -05:00
J. Nick Koston 33c6b3161b Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-22 00:48:41 -05:00
J. Nick Koston 2cedb3d82b Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-22 00:48:41 -05:00
J. Nick Koston 9bb899d8df Never shred a string dependency list, defer and de-duplicate drop warnings
A plain-string dependencies value comma-splits into names instead of
iterating into one-character libraries; entries that normalize to
nothing warn naming the manifest, and the walk's version-less skip logs
at debug for every backend. The not-bundled warning is deferred until
after the walk and stays quiet for names resolved transitively, so a
false skipping message cannot teach users to ignore the real one. An
explicitly requested bundled library that resolves to no sources and no
headers warns that the install may be incomplete.
2026-08-22 00:48:30 -05:00
J. Nick Koston 76a80bd346 Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain 2026-08-22 00:18:46 -05:00
J. Nick Koston 7ab66de38b Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-22 00:18:46 -05:00
J. Nick Koston 0bd66b8e9b Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-22 00:18:46 -05:00
J. Nick Koston 35c77165ca Surface every dependency-drop path the walk can take
The converted path warns for a properties-only depends= spelling (the
walk reads the JSON key). A dependency name is validated before
becoming a path component: non-strings and separator names are
malformed entries, never joined (apply_extra_script already guards the
same shape). normalize_dependencies coerces PIO's bare string-list form
to name dicts instead of dropping it before every visibility warning. A
non-* version pin discarded for a backend-provided bundled copy warns
naming the substitution. The -I global-include promotion and the
start-group link-order contract are documented.
2026-08-22 00:18:35 -05:00
J. Nick Koston 0f885b4037 Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain 2026-08-21 21:27:59 -05:00
J. Nick Koston 09518f4032 Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-21 21:27:59 -05:00
J. Nick Koston 7732b688f5 Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-21 21:27:59 -05:00
J. Nick Koston 44b14d8655 Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend 2026-08-21 21:27:59 -05:00
J. Nick Koston 4eb31c45da Isolate the preresolved-ccache test from ambient CCACHE_DIR, future-tense the sentinel comment 2026-08-21 21:27:49 -05:00
J. Nick Koston 8b21fa620d Cover the pre-resolved ccache branch of get_idedata 2026-08-21 21:20:58 -05:00
J. Nick Koston 116b4ce444 Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain 2026-08-21 21:11:22 -05:00
J. Nick Koston 91cf9be5eb Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-21 21:11:21 -05:00
J. Nick Koston 2959fb6e7d Resolve the test's gcc path through toolchain_tool so Windows stats the .exe 2026-08-21 21:11:20 -05:00
J. Nick Koston c0a605c1b9 Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain 2026-08-21 21:01:48 -05:00
J. Nick Koston 227522364a Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend 2026-08-21 21:01:47 -05:00
J. Nick Koston 4bea2dd058 Merge branch 'esp8266-native-build-infra' into esp8266-native-framework-installer 2026-08-21 21:01:47 -05:00
J. Nick Koston a9994c6895 Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission 2026-08-21 21:01:47 -05:00
J. Nick Koston fab8af6c88 Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec 2026-08-21 21:01:47 -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 17f718e8c9 Simplify the native dispatch and CI cache wiring
A cache-arduino8266 composite action mirrors cache-esp-idf (one key
resolver, dev-writes/PR-restores) and both jobs pin
ESPHOME_ARDUINO8266_PREFIX so YAML and Python agree on the path by
construction. esp32 provides the native_toolchain_module hook, so the
shared dispatcher never names a backend and the unclaimed-native raise
loses its esp-idf carve-out; the esp8266 decode and run_compile hooks
resolve through the same seam. run_compile resolves ccache once and
threads it to the generator, env, and idedata; the compdb rule names
follow the shared kinds; the pio-options warner inlines into the driver
and derives its consumed set from the core routing constant; the
per-toolchain CI narrowing shares one body; create_components_graph is
memoized per run; the decode rate-limit drops its math sentinel.
2026-08-21 20:55:27 -05:00
J. Nick Koston 80a4178f05 Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain 2026-08-21 20:49:32 -05:00
J. Nick Koston 0973044214 Strip the python path for cmd.exe, name rules by kind, take the resolved install
The build.ninja python variable goes through strip_win_long_path_prefix
like every other emitted binary path (the NSIS launcher's extended
prefix cannot be spawned by cmd.exe). Compile rules are named by the
shared source kinds directly, retiring the identity translation table
and its drift test. write_project takes the caller's resolved ccache,
get_flash_ld_path reads the InstalledPaths the ninja file linked
against instead of re-resolving the version, the board backstop checks
the one table it indexes with an honest comment, and cc/cxx/ar paths go
through the shared toolchain_tool accessor (gaining the Windows
suffix).
2026-08-21 20:49:30 -05:00
J. Nick Koston d628bc3aae Merge branch 'esp8266-native-build-spec' into esp8266-native-ninja-emission
# Conflicts:
#	esphome/build_gen/arduino8266.py
#	tests/unit_tests/build_gen/test_arduino8266.py
2026-08-21 20:47:42 -05:00
J. Nick Koston e5ad855337 Use the shared tool accessor for gcc, drop dead dataclass defaults, add a resolve test helper
toolchain_tool owns the bin path and Windows suffix now; _BuildConfig's
knob and MMU fields are required since the only constructor always
passes both; the tests' set-flags-then-resolve idiom collapses into one
_resolve helper (12 sites).
2026-08-21 20:47:17 -05:00
J. Nick Koston aad89cd939 Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend 2026-08-21 20:46:18 -05:00