Fix ESP32-S31-WROOM-3 symbol failing to load in KiCad

The easyeda2kicad.py-generated file had an unquoted URL as the
(generator ...) value: '(generator https://github.com/uPesy/...)'.
Bare/unquoted s-expression tokens can't contain ':' or '/', which broke
KiCad's parser and made the whole library silently fail to load (the
symbol was present on disk and correctly registered in fp/sym-lib-table,
but invisible in KiCad). Wrapped the value in quotes.

Also added a check_library.py rule to catch this class of error (an
unquoted generator value containing ':' or '/') automatically going
forward.
This commit is contained in:
2026-08-16 13:22:58 +02:00
parent 6207faf3dc
commit 96f803f5d9
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -119,6 +119,14 @@ def check_symbols(report: Report) -> list[tuple[str, Path]]:
if not parens_balanced(text):
report.error(f"[SYM] {path.relative_to(ROOT)}: unbalanced parentheses")
gen_m = re.search(r'\(generator\s+([^\s")]+)', text)
if gen_m and re.search(r'[:/]', gen_m.group(1)):
report.error(
f"[SYM] {path.relative_to(ROOT)}: unquoted '(generator {gen_m.group(1)})' "
f"contains ':' or '/' -- this breaks KiCad's parser and silently makes the "
f"whole library fail to load; wrap the value in double quotes"
)
digest = lc.sha256_file(path)
if digest in seen_hash:
report.warn(
@@ -1,6 +1,6 @@
(kicad_symbol_lib
(version 20211014)
(generator https://github.com/uPesy/easyeda2kicad.py)
(generator "https://github.com/uPesy/easyeda2kicad.py")
(symbol "ESP32-S31-WROOM-3_C9900281993"
(in_bom yes)