pixi icon indicating copy to clipboard operation
pixi copied to clipboard

pixi.lock compression

Open bjlittle opened this issue 1 year ago • 2 comments

Problem description

First of all, thanks for pixi! 🎉

Would there be any interest in providing auto-compression/decompression of the pixi.lock file managed by pixi?

The use case here is for managing a workspace that has many environments and dependencies supported for several platforms (i.e., linux, osx, win et al) which can result in a surprisingly large pixi.lock file.

Typically the pixi.lock file is placed under version control, so minimising its footprint would be ideal.

Many thanks!

bjlittle avatar Oct 16 '25 13:10 bjlittle

hey @bjlittle ! Thanks for raising this question!

Unfortunately, switching from a text file to a binary lock file introduces some new challenges/or downsides ( thanks @baszalmstra for pointing them out)

  • During the merge conflicts, it's hard to decide which binary and why you will pick
  • We can't easily inspect it (even from the github itself ). Also, other tooling (that can use these lockfiles) should now also understand how to compress/decompress. git diff is also it's not an option anymore.
  • There will be a speed penalty for decompressing/compressing, so pixi install will become slower
  • Storing binaries will increase git history size because git is using delta compression, so it can't any more store a base version of the file and append the series of changes on top of it, which is easily done with text files.

I will also add here bun experience from migrating to the text lock file: https://bun.com/blog/bun-lock-text-lockfile and the relevant issue: https://github.com/oven-sh/bun/issues/11863

I will close this issue for now, but feel free to re-open if you have any other ideas/arguments.

nichtmacho avatar Oct 17 '25 09:10 nichtmacho

Awesome, thanks @nichmor for taking the time to reflect on this and feedback.

Really appreciate it 💯👌

I thought there would be several downsides to using compression here, so it's super helpful to understand the argument against supporting that.

🍻

bjlittle avatar Oct 17 '25 09:10 bjlittle