Skip to content

pins: one DEPENDENCIES.lock in place of four pin files - #395

Merged
bdbarnett merged 2 commits into
mainfrom
one-pin-file
Nov 10, 2026
Merged

bdbarnett merged 2 commits into
mainfrom
one-pin-file

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

Everything a build fetches is now pinned in one root file, DEPENDENCIES.lock, in place of UPSTREAM, modules.lock, deps.lock and modules/.esp-vision/ESP_VISION.lock. Each line is <name> <url> <full commit>, and scripts/pins.py is the one parser every script and workflow uses (python3 scripts/pins.py --list shows how it reads the file). The four toolchains that were pinned by tag (esp-idf, emsdk, espressif__tinyusb, circuitpython) now pin the commit their tag is, checked with git ls-remote, and keep the tag as a trailing # tag <tag>. The build still fetches them by tag, and now refuses a checkout whose tag has moved off the pinned commit. Six inputs aren't git checkouts: SDL2's tarball and the five ESP-IDF registry components. They sit in a marked Downloads section, and their third column is a version. No pin changes value. A table of what every name resolves to (name, commit or version, tag, URL) is identical when built from the old files on main and from the new one.

Some behaviour changes along the way. Workflow path filters, cache keys and ci_scope.py name the new file. Because MicroPython's pin is in it, a MicroPython move now reaches the CircuitPython jobs and the whole firmware set, which UPSTREAM didn't. The deps caches are keyed on a hash of the toolchain lines only (pins.py --key toolchains), so a module move doesn't throw them away. emsdk is now cloned at its tag rather than at main, which is the release that tag installs. The pins block of firmware.json is now keyed by name with commit and tag, or version for a download, under schema 2.

Tested with the scoped unit tests (203, including a new tests/test_pins.py) and one local unix build from a plain clone with audiodsp, pygraphics, ulab, lvgl and pydevices, which fetched everything at its commit and reports v1.30.0-preview.160.gb70ae1aca6. Planting faults, the build refuses a wrong MicroPython commit, a short commit, an unfetched module commit, and a toolchain whose tag isn't the pinned commit. It doesn't refuse a module checkout that already exists at another commit, and it checks a workspace-linked toolchain only by version, both as before. The devcontainer prefetch calls are unchanged and weren't run in a container.

UPSTREAM, modules.lock, deps.lock and modules/.esp-vision/ESP_VISION.lock
become one root DEPENDENCIES.lock, a `<name> <url> <commit>` line per
dependency. A toolchain fetched by tag keeps the tag in a trailing
`# tag <tag>` and now pins the commit too: a fresh fetch whose tag has
moved is refused. SDL2 and the ESP-IDF registry components are archives,
pinned by version as before.

scripts/pins.py is the one reader: build_mp.py, apply_patches.py, the
release, provenance and scope scripts import it, and the workflows,
fetch.sh and pin_lvgl_ref.sh run it. Every pin resolves to the same
commit or version as before. The toolchain caches are keyed on the
toolchain lines alone, so moving a module pin doesn't refetch ESP-IDF.
@bdbarnett
bdbarnett merged commit d599074 into main Nov 10, 2026
59 checks passed
@bdbarnett
bdbarnett deleted the one-pin-file branch November 10, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant