Skip to content

feat(vendor): install the locked addons into the group directories - #33

Merged
bosd merged 3 commits into
mainfrom
feat/vendor
Oct 13, 2026
Merged

bosd merged 3 commits into
mainfrom
feat/vendor

Conversation

@bosd

@bosd bosd commented Oct 13, 2026

Copy link
Copy Markdown
Member

Phase 5: odx vendor for directory-based platforms.

  • odx-vendor (new implementation):
    • plan: the addon packages per group from uv.lock (declared ones plus addon dependencies no group declares); packages in develop mode, missing from uv.lock or without a wheel fail with their name.
    • archive: wheels fetched exactly as uv.lock names them (HTTPS through reqwest, file:///paths from disk), sha256-checked, cached under the cache's wheels/; zip extraction of odoo/addons/<addon>/ with excludes, refusing entries that leave the addon directory.
    • git packages: git archive of the commit odx.lock locked, from the cache (Merger::archive).
    • content: content hashes, last-segment bumps, in-place manifest version rewrite.
    • record: .odx/vendor.lock (round-trips).
    • Group directories are replaced; one outside the project (also via ..) or holding pyproject.toml/.git is refused.
  • odx vendor writes the directories (not for generic-wheels, where --requirements only writes the requirements); --requirements also writes the requirements file; JSON nests requirements.
  • odx verify --vendored (directories match the manifest, uv.lock/odx.lock unchanged since) and --deployed <dir>.
  • Tried for real: uv lock of two OCA 17.0 addons from PyPI, odx vendor --requirements downloads, verifies and extracts them; a second run is byte-identical; odx verify --vendored --requirements passes.
  • New dep: zip (MIT) with the pure-Rust zlib-rs backend.

odx vendor replaces every [tool.odx.groups] directory with the addons of
the packages the group declares in uv.lock and the addon packages they
need: wheels downloaded as uv.lock names them, sha256-checked and cached,
with odoo/addons/<addon> copied out; packages from git exported from the
commit odx.lock locked. Excluded files are left out, directories outside
the project are refused, and output is byte-identical across runs. A
content change without a version change bumps the last version segment,
kept while the content stays. The vendor manifest records what was
written; odx verify --vendored and --deployed check it.
@github-actions github-actions Bot added the enhancement New feature label Oct 13, 2026
@read-the-docs-community

read-the-docs-community Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 odx | 🛠️ Build #35117287 | 📁 Comparing 7e7a89a against latest (8aa30ee)

  🔍 Preview build  

1 file changed
± cli.html

@bosd
bosd merged commit 6a00259 into main Oct 13, 2026
26 checks passed
@bosd
bosd deleted the feat/vendor branch October 13, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant