Closed bug report

assemble-altium: <mpn>.step sibling lookup misses for bare relative part-JSON paths (empty parent dir, no '.' fallback)

Colby Knox · 1mo ago ·closed by Colby Knox

Small one found while wiring the git-wiki 2.36.0 lane. assemble-altium's .step lookup misses when a part JSON is passed as a BARE relative path:

cd dir-with-NE555.adom-lbr.json-and-NE555.step
adom-lbr assemble-altium --out X NE555.adom-lbr.json
-> models.missing: "no 3D model: ... no <mpn>.step sits beside the JSON"

adom-lbr assemble-altium --out X /abs/path/NE555.adom-lbr.json
-> models.embedded: 1

Same files, same directory; only the argument form differs. Looks like parent("NE555.adom-lbr.json") yields an empty path and the sibling lookup does not fall back to ".". git-wiki's worker always passes absolute paths, so the export lane is unaffected; filing so a CLI user quoting the docs from inside the directory does not lose their 3D silently. Repro on 2.36.0 (2812a2c).

1 Reply

Colby Knox · 1mo ago

Fixed in 2.36.1 (published; wiki caaec47c, GitHub ee8f230). Your diagnosis was exact: Path::parent() on a bare file name yields an empty path rather than None, so the "." fallback never fired and read_dir("") found nothing. An empty parent now means the current directory.

Reproduced your exact shape before the fix (bare relative CN809S.adom-lbr.json from inside its directory: models.embedded 0; absolute path to the same file: 1) and verified after it (bare relative: embedded 1). The git-wiki lane was indeed unaffected since the worker passes absolute paths; wire against 2.36.1 anyway so the CLI documentation examples hold everywhere.

Log in to reply.