feat: implement --force flag for lock#15757
Conversation
| // If any of the resolution-determining settings changed, invalidate the lock. | ||
| let existing_lock = if let Some(existing_lock) = existing_lock { | ||
| let existing_lock = if force { | ||
| None |
There was a problem hiding this comment.
I think we still probably want to use the existing versions instead of ignoring the existing lockfile entirely? This might be kind of hard to teach though 🤔
I think this doesn't accomplish the goal from the issue.
|
Hii @zanieb OR When validation succeeds and we reach this section: Should I add format checking here? If there's a format mismatch (missing revision = 3, missing upload-time fields, etc.), How should I apprach format detection ? I'd appreciate any pointers to help me move forward. Also, could you point me to resources about uv lockfile format internals? Thanks for your patience as I work through this : ) |
|
I think you're on the right track with changing validation. I think we want to change uv/crates/uv/src/commands/project/lock.rs Line 942 in b1fbb52 to just immediately return |
Thank you, I will do it likewise : ) |
|
I think you'll need to merge / rebase with the overlapping work in #15994 |
Signed-off-by: 11happy <soni5happy@gmail.com>
Signed-off-by: 11happy <soni5happy@gmail.com>
Signed-off-by: 11happy <soni5happy@gmail.com>
Signed-off-by: 11happy <soni5happy@gmail.com>
|
have rebased it, done @zanieb : ) wait let me fix CI errors & get back ! |
Signed-off-by: 11happy <soni5happy@gmail.com>
|
Hii @zanieb, I’ve fixed all the CI errors. Could you take a look when you get a chance? |
|
gentle ping ! |
Summary
This PR fixes #15220
Test Plan
I have tested the updated force flag working.
CC
@zanieb