Skip to content

fix: put .pixi/build in detached-environments location#5787

Closed
moritzwilksch wants to merge 1 commit intoprefix-dev:mainfrom
moritzwilksch:mw/detached-build
Closed

fix: put .pixi/build in detached-environments location#5787
moritzwilksch wants to merge 1 commit intoprefix-dev:mainfrom
moritzwilksch:mw/detached-build

Conversation

@moritzwilksch
Copy link
Copy Markdown
Contributor

@moritzwilksch moritzwilksch commented Mar 27, 2026

Description

This changes pixi to store the .pixi/build directory alongside the environment in the detached location when detached-environments is enabled.

I'm using detached-environments because my project directory lives on a slow network filesystem, so I create the pixi environment in a faster, machine-local location. That works well for the environment itself, but .pixi/build still gets created in the project directory, which slows things down. It would be more consistent to put that directory in the detached location too.

Fixes #4320

How Has This Been Tested?

  1. git clone https://github.com/moritzwilksch/pixi-workspace-demo && cd pixi-workspace-demo
  2. Set detached-environments="/tmp" in ~/.pixi/config.toml
  3. Build pixi on this branch
  4. pixi install
  5. ls -l .pixi/
➜  pixi-workspace-demo git:(main) ✗ /Users/moritzwilksch/Documents/pixi/target/debug/pixi i
✔ The default environment has been installed in '/tmp'.
➜  pixi-workspace-demo git:(main) ✗ ll .pixi/
total 0
lrwxr-xr-x@ 1 moritzwilksch  staff    42B Mar 27 16:23 build@ -> /tmp/wspace-demo-7225176843553100987/build
lrwxr-xr-x@ 1 moritzwilksch  staff    41B Mar 27 16:23 envs@ -> /tmp/wspace-demo-7225176843553100987/envs
➜  pixi-workspace-demo git:(main) ✗

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.
      Tools: Claude, Codex

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.
  • I have verified that changes that would impact the JSON schema have been made in schema/model.py.

@moritzwilksch moritzwilksch changed the title Support detached-environments location for .pixi/build dir fix: put .pixi/build in detached-environments location Mar 27, 2026
@pavelzw
Copy link
Copy Markdown
Collaborator

pavelzw commented Apr 9, 2026

sorry, forgot to review this after dealing with the exclude-newer stuff. @ruben-arts solved it in #5855 so i guess we can close this one 😅

@pavelzw pavelzw closed this Apr 9, 2026
@ruben-arts
Copy link
Copy Markdown
Contributor

Oh sorry this also completely missed my scope 🥲

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.pixi/build should symlink as well when using detached-environments = true

3 participants