Draft
Conversation
Each member is now its own standalone [workspace] with its own envs, lockfile, and .pixi/ install dir - the root just aggregates and dispatches. Fixes the submodule case: cd into a member and pixi run test works on its own. find_task routes a::b::task to the member's default env, so cwd, activation, and lockfile all target the member naturally. pixi run is lazy (only touches members it uses); pixi install at the root is eager (walks every member). Stays behind the hierarchical-tasks preview flag.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #5003.
Adds
hierarchical-tasksas a preview feature. A root workspace canaggregate nested member workspaces, and you can address a member task
with
:::Each member has its own
[workspace], its own envs, its own lockfile,its own
.pixi/envs/.cdinto the member andpixi run teststillworks on its own: the upward walk stops at the member's
pixi.tomland the outer aggregation is invisible. Same as git submodules.
Design
#5003 opened with
includes = [...]. I used phuicy's proposal instead.Two quotes from the issue that shaped this PR:
That is what this PR does. Nothing more. No dep merging, no unified
lockfile, no public/private, no
-w. All called out as follow-upson #5003.
Behavior
[workspace]presence.
[package]-only manifests are transparent — discoverywalks through them.
WorkspaceviaWorkspaceLocator::locate, the same path any standalone pixiproject uses.
a::b::taskrouting looks the task up in the member's defaultenvironment. The returned
Environmentbelongs to the member, socwd, activation, lockfile, and install dir all follow naturally.pixi runis lazy: only members you actually touch get theirlockfile updated and env installed.
pixi installat the root is eager: walks every member andinstalls each one's default env.
[workspace]wins. If you're inside a member, that member is yourroot; the outer aggregation is only visible when you run from the
outer root.
Gated on
preview = ["hierarchical-tasks"]. Flag off → zero changein behavior.
Docs:
docs/workspace/hierarchical_tasks.md, linked under Conceptsin
mkdocs.yml.How Has This Been Tested?
pixi_manifest::members— 12 unit tests (empty tree, top-level andnested members, transparent intermediates, skip list, duplicate
sibling names, deeply nested chains, insertion order,
[package]-onlytransparency).
pixi_task::task_environment— 6 integration tests, notablyasserting
env.workspace().root()is the member's directory afterrouting
a::testanda::c::test.pixi run test-fast— 1420 tests pass.To reproduce: build pixi locally, drop this layout in a tempdir, and
run the commands below.
AI Disclosure
Tools: Claude (Opus 4.7).
Checklist:
schema/model.py. (Worth checking whether the preview-flag list inschema/model.pyneedshierarchical-tasksadded.)