Closed general

project-page rebuilds the KiCad PCM package with the same version (1.0.0), so KiCad never installs the updated library

noah · ·closed by John Lauer

Version: adom-aiflow 0.2.56 (local build 0.2.56+noah.1), KiCad 10.0.4 on Windows 11 (PCM), wiki page noah/adam-telle-nameplate.

What I ran: project-page --page noah/adam-telle-nameplate --existing --brief design/brief-page.md after the BOM changed (prompt 2 added an STM32G0B1 and a USB-C; prompt 3 changed parts again).

What happened: the rebuilt KiCad PCM repository still publishes inc.adom.wiki.noah.adam-telle-nameplate version 1.0.0 (pcm/packages.json, adam-telle-nameplate-pcm-1.0.0.zip), with new footprints, symbols and models inside. KiCad's Plugin and Content Manager already has 1.0.0 installed, so it sees no update and keeps the old library: new parts (e.g. SOT-23-3, CQ03SAF4701T5E, RC0805JR-070RL) are missing from KiCad until the package files are copied into Documents/KiCad/10.0/3rdparty by hand.

Expected: each rebuild whose content differs bumps the package version (e.g. 1.0. or a date-based version) so kicad_pcm_install / the PCM updates the installed library.

Workaround: download the zip from the page and copy footprints/, 3dmodels/ and symbols/ into the 3rdparty folders under inc_adom_wiki_noah_adam-telle-nameplate.

1 Reply

John Lauer ·

Thanks Noah, you were exactly right, and the workaround you described (copying the folders into 3rdparty by hand) is what nobody should have to do.

What was wrong: project-page passed a fixed version, 1.0.0, into the PCM package every time it rebuilt it. KiCad's Plugin and Content Manager only installs a higher version than the one it already has, so a rebuilt library with new footprints, symbols and models still looked like the installed 1.0.0 and was never offered as an update.

What changed, in adom-aiflow 0.2.58:

  • The package version now follows its content. project-page hashes every file of the package (not the zip, whose timestamps change on every build). The first build is 1.0.0. A rebuild whose files differ from the last build gets the next patch version (1.0.1, 1.0.2, ...). A rebuild with the same content keeps its version.
  • The last build is read from the run's own project-page/pcm/build.json, and on an existing page from the page's published pcm/build.json and pcm/packages.json. A page published before this fix (yours serves 1.0.0 with no build record) counts as changed content, so your next project-page --existing publishes 1.0.1.
  • pcm/build.json (version, content hash, identifier) is now pushed with the repository, so a later run on another machine continues the numbering.
  • The project-page OK line names the package version, and when it moved up there is a hint with kicad_pcm_install {"identifier":"...","update":true}.
  • pcm check now compares the version installed in KiCad with the version the page built and reports an older install as a finding with that same update call. (It also no longer stops with an error when the package is not installed; it reports that as a finding with the install calls. AI Flow never refuses.)

How it was verified: new tests in tests/project-page-library.py build the package twice with the same parts (both 1.0.0), then with a changed part list (1.0.1 in the zip name, packages.json and the zip's own metadata.json), and run against a page that already serves 1.0.0 with no build record (the result is 1.0.1 and pcm/build.json is pushed). A unit test covers the version rules (never back to a lower version, no recorded hash counts as changed). All suites pass.

Still open: nothing for this issue. KiCad itself still needs the update applied (the bridge call above, or Update in the PCM dialog after a restart).

Upgrade: tell your AI "give me the latest adom-aiflow" (or adom-wiki pkg install adom/adom-aiflow); adom-aiflow --version says 0.2.58.

John Lauer closed this ·

Log in to reply.