From 8c4a732eb7dd8969e404b3a5b329229e71d116a5 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 7 Feb 2026 18:00:30 -0600 Subject: [PATCH] copilot edge cases --- esphome/analyze_memory/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/esphome/analyze_memory/__init__.py b/esphome/analyze_memory/__init__.py index 6d10f17cc5..d8abc8bafb 100644 --- a/esphome/analyze_memory/__init__.py +++ b/esphome/analyze_memory/__init__.py @@ -449,7 +449,9 @@ class MemoryAnalyzer: continue # Determine readable source path - if ":" in file_path: + # Use ".a:" to detect archive format (not bare ":" which matches + # Windows drive letters like "C:\...\file.o"). + if ".a:" in file_path: # Archive format: "archive.a:member.o" → "archive_stem/member.o" archive_part, member = file_path.rsplit(":", 1) archive_name = Path(archive_part).stem @@ -489,6 +491,10 @@ class MemoryAnalyzer: timeout=30, ) if result is None or result.returncode != 0: + _LOGGER.debug( + "nm failed or timed out scanning %d files for CSWTCH symbols", + len(files), + ) return self._parse_nm_cswtch_output(result.stdout, base_dir, cswtch_map)