-
Notifications
You must be signed in to change notification settings - Fork 421
docs: Rewrite docs page on lock file #5404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
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 |
| 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 | ||
|
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
These are covered now in the other sections.
83db1bf to
b7b81e7
Compare
|
|
||
| This simplified setup forgoes reproducibility between machines. | ||
|
|
||
| In both approaches, the test suite is used to determine whether the library is working as expected. |
There was a problem hiding this comment.
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?)
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:
pixi.lockFixes #5325
How Has This Been Tested?
NA
AI Disclosure
No AI used
Checklist: