-
Notifications
You must be signed in to change notification settings - Fork 387
feat: gracefully handle newer lock-file versions #4897
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
feat: gracefully handle newer lock-file versions #4897
Conversation
|
I think we should explicitly ask user to confirm that they want to recreate the lockfile, as this action may break some setups like when you didn't staged your changes in a VCS or if you don't use repository at all. Also, then we should add a flag like |
This only happens if you (or more likely someone else) used a newer pixi version to generate a lock-file. You pulled that change. Any command you then run with your local (older) pixi will overwrite the upstream changes which I think should be easy to get back. |
tdejager
left a comment
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.
The changes look good and promising but what is the best way to test this :)?
|
I describes the testing procedure in the description of the Pr. |
ruben-arts
left a comment
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.
Thank you, this is a great addition! Love the use of the miette diagnostics for this, and great forward-thinking on giving different messages based on self-update.
Works on my machine 👍
This PR relaxes the behavior that occurs when pixi encounters a lock-file version that it cannot parse.
Test setup
$ pixi init foobar $ cd foobar $ pixi lockThen manually modify the version in the
pixi.lockto be something higher than what is there (I used 7).Previously
When running any command:
With this PR
If
self_updateis enabled the error message will say:If
--lockedor--frozenis specified there is still an error:AI Disclosure
Written by Claude Code, designed by me