Use script-aware lock mismatch diagnostics - #20439
Open
zanieb wants to merge 1 commit into
Open
Conversation
| .unwrap_or(script.as_os_str()) | ||
| .to_os_string(); | ||
| file_name.push(".lock"); | ||
| PathBuf::from(file_name) |
Member
There was a problem hiding this comment.
Can we reuse this logic anywhere else? I thought we had a utility / abstraction for this already.
Member
Author
There was a problem hiding this comment.
I think the issue is that we have LockTarget which holds a borrow and can't be used in errors.
I complained about this in my self-review and it was supposed to be fixed (at least, the relationship was supposed to be mentioned in the LockTargetKind comment. Let me see... it's also plausible we can abstract this specific logic.
charliermarsh
approved these changes
Jul 15, 2026
zanieb
force-pushed
the
zb/bughunt200/136-script-lock-diagnostics
branch
from
July 15, 2026 21:48
10ace64 to
25b578b
Compare
uv test inventory changesThis PR changes the tests when compared with the latest
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A stale script lock reports
uv.lockand suggestsuv lock, directing users to update the wrong file. Show the actual script lock and a command that repairs that script, quoting its path so spaces and shell metacharacters cannot make the hint unusable.#18832 added script-lock errors and #20219 moved lock repair guidance into a hint; this makes that hint target the script.