← Commit history

0.9.277: kicad_adom_library_status: orphanedLibrary now means the orphan holds symbols the registered file lacks (unique-name compare; new orphanMissingFromRegistered and orphanMissingSample). A count compare kept flagging John's orphan after the 0.9.276 merge because its 122 lenient count included 28 duplicate copies. build_release.py refuses a non-semver first argument (a stray flag was once stamped in as the version).

John Lauer ·d486f48e71 ·1mo ago ·parent 36e1214
3 files changed +21−4
BRIDGE_VERSION+1−1
@@ -1 +1 @@-0.9.276\ No newline at end of file+0.9.277\ No newline at end of file
adom_library.py+19−2
@@ -128,8 +128,25 @@ def library_split_report(kicad_info: dict) -> dict:            "bridgeDefaultPath": str(default).replace("\\", "/") if default else None,            "bridgeDefaultSymbols": count(default) if default else None}     rep["split"] = bool(default) and Path(default).resolve() != Path(registered).resolve()-    if rep["split"] and (rep["bridgeDefaultSymbols"] or 0) > (rep["registeredSymbols"] or 0):-        rep["orphanedLibrary"] = rep["bridgeDefaultPath"]+    if rep["split"]:+        # Compare UNIQUE names, not counts. After John's merge the registered+        # file held all 94 unique symbols while the orphan's lenient count was+        # still 122 (28 duplicate copies), so a count comparison kept flagging+        # a library that had nothing left to give. "Orphaned" means: has symbols+        # the registered file lacks.+        try:+            reg_names = {n.lower() for n, _ in _extract_symbols_tolerant(Path(registered).read_text(encoding="utf-8"))}+        except Exception:+            reg_names = {n.lower() for n in (list_symbols(registered) or [])}+        try:+            orp_syms, _notes = _extract_symbols_tolerant(Path(default).read_text(encoding="utf-8")) if default and Path(default).exists() else ([], [])+        except Exception:+            orp_syms = []+        missing = sorted({n for n, _ in orp_syms if n.lower() not in reg_names})+        rep["orphanMissingFromRegistered"] = len(missing)+        if missing:+            rep["orphanedLibrary"] = rep["bridgeDefaultPath"]+            rep["orphanMissingSample"] = missing[:10]     return rep  
bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "kicad",   "displayName": "KiCad EDA",-  "version": "0.9.276",+  "version": "0.9.277",   "description": "Reverse bridge for KiCad \u2014 board/schematic introspection, lint via kicad-cli, plugin install, multi-instance probe, in-process DRC.",   "homepage": "https://wiki.adom.inc/adom/adom-bridge",   "author": "Adom Inc.",