ysync 0009 phase 4: sym_convert --lint mode (kicad_lint folded into the converter)

sym_convert --lint [--strict] <file...>: full parse for .kicad_sch (restored
LoadSchematicFile + minimal headless PGM/SETTINGS_MANAGER runtime,
aSetActive=false) and .kicad_sym/.lib; structure-only for other s-expr files;
dup-uuid identity lints (walker) on every s-expr input; errors as
file:line:offset, exit 0/1/2. Convert mode byte-identical (qa gate).

Fixes en route: 64KB stack local overflowed the default wasm stack (mimalloc
corruption); pre-js now inherits process.env into getenv (KICAD_CONFIG_HOME /
SYM_CONVERT_TRACE); font abort stub retired (SCH_SCREEN::Append bbox resolves
draw fonts) -> 18.0MB; six GetMsgPanelInfo typeinfo stubs; BUILD_3D_VIEWER
defaults OFF for headless CLIs (gl1 shim needs glm).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0142yAmMGZ3Ejrq3wwVr2Yq2
This commit is contained in:
Gergő Törcsvári 2026-07-10 13:13:51 +02:00
commit 28388990ee
No known key found for this signature in database
GPG key ID: 8E75F2CDE64E5322
6 changed files with 559 additions and 41 deletions

View file

@ -67,11 +67,15 @@ case "$APP_NAME" in
KICAD_SUBDIR="pcb_calculator"
;;
sym_convert)
# Standalone .lib -> .kicad_sym converter (node CLI). Its add_executable
# lives in eeschema/CMakeLists.txt (gated by KICAD_SYM_CONVERTER_WASM), so
# artifacts land in the eeschema/ subdir of its own kicad-sym_convert tree.
# Standalone .lib -> .kicad_sym converter + --lint CLI (node). Its
# add_executable lives in eeschema/CMakeLists.txt (gated by
# KICAD_SYM_CONVERTER_WASM), so artifacts land in the eeschema/ subdir
# of its own kicad-sym_convert tree. A headless CLI has no 3D viewer:
# skip the wasm/gl1 FFP shim compile (it needs glm, which the libs
# sysroot doesn't guarantee) unless the caller forces it.
KICAD_TARGET="sym_convert"
KICAD_SUBDIR="eeschema"
BUILD_3D_VIEWER="${BUILD_3D_VIEWER:-OFF}"
;;
occ_service)
# Standalone OpenCASCADE 3D service (worker embind module). Target lives