Repository navigation
Description
Context
In a monorepo, updating a common dependency (e.g. Python) across many packages currently requires hand-editing every pixi.toml to keep the MatchSpec consistent. Users have resorted to sed scripts to do this. This was raised in discussion #5940 by @GuillaumeQuenneville under "Inherited Dependency Versions".
Proposal
What the user writes
Root pixi.toml (workspace):
[workspace.dependencies] # conda
numpy = "1.*"
boltons = { version = ">=24", channel = "conda-forge" }Member pixi.toml:
# Build packages
[package.build]
backend = { name = "foo-build", workspace = true }
[package.host-dependencies]
cmake = { workspace = true }
[package.target.linux-64.run-dependencies]
numpy = { workspace = true }Semantics
{ workspace = true }is only valid if the workspace defines that name in the matching[workspace.dependencies]table. Otherwise it's an error, with the span pointing at the offending entry.{ workspace = false }is rejected (same convention pixi already uses for inheritable metadata fields).- Workspace tables only define defaults that members opt into. A member that doesn't write
{ workspace = true }keeps full control; there is no implicit inheritance. - Inheritance is allowed from package dependency tables:
[package.build.backend],[package.host-dependencies],[package.build-dependencies],[package.run-dependencies],[package.run-constraints], and their[package.target.<sel>.*]variants.
- Inheritance does not apply to
constraintsorexclude-newer.
Overrides on the member side
The workspace entry is the base; the member's entry layers on top. The base version always wins — the member never restates or narrows it.
The member may layer any non-version attribute on top of the workspace base: channel, build, subdir, md5, sha256, url, path, git, branch, rev, tag, subdirectory. Restating version on the member is an error. Mixing a binary workspace spec with a source-style override (or vice-versa) is an error.
Future: conda extras
Once conda gains extras (matching the existing PyPI concept), workspace inheritance for conda will treat extras identically to PyPI: the workspace value and member value are unioned, while all other fields layer with the workspace as the base.
Source dependency paths
Relative path specs in [workspace.*-dependencies] are resolved relative to the workspace root, not the consuming member's directory. Resolution happens once on the workspace side before the spec is handed to members.
Tooling
pixi add <pkg> --workspace: writes the spec into the root[workspace.dependencies](or the matching pypi/host/build table) and writes<pkg> = { workspace = true }into the current member.
Out of scope for v1 (follow-ups)
pixi upgrade/ version-bump UX across workspace + members in a single command.- Conda
extras(tracked separately; this design just reserves the behavior).
References
- GitHub discussion: Improved monorepo support #5940
- Specific comment: Improved monorepo support #5940 (comment)
Activity
ruben-arts commentedon May 15, 2026
This proposal misses the definition of a "member". Are members, workspaces or packages?
Edit: The "Member" is a
packagein the subdir of aworkspaceright now. Until we have a different way to do this.ruben-arts commentedon May 15, 2026
It looks good to me.
feat(manifest): support `[workspace.dependencies]` for inherited vers…
feat(manifest): support `[workspace.dependencies]` for inherited vers…
feat(manifest): support `[workspace.dependencies]` for inherited vers…
feat(manifest): support `[workspace.dependencies]` for inherited vers…
feat(manifest): support `[workspace.dependencies]` for inherited vers…
feat(manifest): support `[workspace.dependencies]` for inherited vers…
feat(manifest): support `[workspace.dependencies]` for inherited vers…