Skip to content

Conversation

@VeckoTheGecko
Copy link
Contributor

@VeckoTheGecko VeckoTheGecko commented Jan 25, 2026

Description

When working on #5325 I found there was no way to write what I wanted to in the current structure. I also found that this page wasn't well suited to those who might be unfamiliar with a lock file and how that differs from a manifest (which in my experience is a lot of people I know who use conda).

Marking as draft for now as I still want to do the following:

  • Finish the section on the file structure of pixi.lock
  • Proof editing
  • Look through the git history of this file in case there are things I'm missing that would be good to mention

Fixes #5325

How Has This Been Tested?

NA

AI Disclosure

No AI used

Checklist:

@VeckoTheGecko VeckoTheGecko marked this pull request as draft January 25, 2026 23:13
@VeckoTheGecko
Copy link
Contributor Author

Did a quick proofread and review and already a bunch of stuff came up. Will finalise this over the coming couple days then should be good for review

Comment on lines +13 to +15
A lock file improves reproducibility as it means the project environment can easily be recreated on the same machine using this relatively small file.
Whether the lockfile can be recreated on other machines, however, depends on the package manager and whether they have cross platform support.
For example - a common problem encountered is when a package manager installs a package for a specific operating system or CPU architecture that is incompatible with other OSs or hardware.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to express what a lockfile can do for the user. The description of the problem feel out of place here. Also using package manager seems to general for the pixi documentation so I would leave that line out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so I would leave that line out.

This line?
"For example - a common problem encountered is when a package manager installs a package for a specific operating system or CPU architecture that is incompatible with other OSs or hardware."

I'm happy to remove that specific line, though I would like to keep the rest. I think having some notes with how Pixi stacks up with other package manages is very valuable for users learning about Pixi.

You may be hesitant to commit a "large" file (`pixi.lock` files can reach over 30,000 lines for complex environments), but know that:
- this file is only a few megabytes at most
- lock file merges are managed reasonably well by Git

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a lockfile also make sure that you don't have to rerun the dependency resolution. For binary only packages this is really fast, but when you start mixing in source dependencies this could actually start to take some time from the user. There for a lockfile can also be seen as a cache to speed up it's usage.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha - but I'm just wondering whether this should be mentioned here in this section since it doesn't really have to do with the committing of the file? (or is your comment to do with cross-collaboration between devs as well?)

If you commit the lock file in your library project, you will want to also consider the following:
- **Upgrading the lockfile:** How often do you want to upgrade the lockfile used by your developers? Do you want to do these upgrades in the main repo history?
- **Custom CI workflow to test against latest versions:** Do you want to have a workflow to test against the latest dependency versions? If so - you likely want to have the following CI workflow on a cron schedule:
- Remove the `pixi.lock` before running the `setup-pixi` action
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be the same as running pixi update. You can provide setup-pixi with the run-install: false to avoid the initial install.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to just mention one method. Would you prefer I update to along the lines of your comment here?

@VeckoTheGecko VeckoTheGecko marked this pull request as ready for review January 28, 2026 22:30

This simplified setup forgoes reproducibility between machines.

In both approaches, the test suite is used to determine whether the library is working as expected.
Copy link
Contributor Author

@VeckoTheGecko VeckoTheGecko Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is the best way of wording this. What I was trying to get across is that the lock file is less imporant for libraries, and whats more important is a passing test suite for all the environments that I want to test against.

Does that make sense? (and is that conveyed through that sentence?)

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.

Documentation on whether to commit the lockfile

3 participants