Repository navigation
Conversation
3ac6624 to
eecf75d
Compare
uv test inventory changesThis PR changes the tests when compared with the
|
7763503 to
d571eae
Compare
d571eae to
6b96f5e
Compare
56a85fb to
4ae7a06
Compare
| &existing_lock | ||
| { | ||
| let _ = writeln!(printer.stderr(), "{}", Hints::from(reason.to_string())); | ||
| } |
There was a problem hiding this comment.
This seems wrong -- shouldn't it be using Hinted? The hint also appears before the error.
There was a problem hiding this comment.
Changed it to Hinted; that type is younger than this PR :D. It's more consistent, but it also feels less helpful? Previously you got the relevant information last, and then the motivation if you looked higher, now you first get the motivation at the bottom and then have to like higher for the network error.
There was a problem hiding this comment.
I guess this doesn't quite make sense following our prior discussion of what a Hint should be, where we said we want hints to be actionable suggestions. It does match a lot of our current use, but I'd expect it to move to an info: block attached to the error long-term. Does that sound right to you?
There was a problem hiding this comment.
Reflecting on this as a whole, this is maybe the first info: style item I've seen that we'd want to put at the top-level since it's information about why we were performing a solve rather than an information about any particular error, I agree with Charlie that it'd be weird if it came before the error though?
There was a problem hiding this comment.
This could become a good case study for info:, right now though it fits well with the existing use of hints.
| write!(f, "\n Added: `{requirement}`")?; | ||
| } | ||
| for requirement in self.actual.difference(&self.expected) { | ||
| write!(f, "\n Removed: `{requirement}`")?; |
There was a problem hiding this comment.
Should this use the same style from our dry-run reporter? Or even the same underlying formatter?
There was a problem hiding this comment.
I tried that but to me it looks worse:
error: Failed to download `a @ http://[LOCALHOST]/files/a-1.0.0-py3-none-any.whl`
cause: Network connectivity is disabled, but the requested data wasn't found in the cache for: `http://[LOCALHOST]/files/a-1.0.0-py3-none-any.whl`
hint: The lockfile needs to be updated because the requirements for `project` have changed:
Remove project>=0.0.1
Add project>=0.1.0
There was a problem hiding this comment.
I made the style more similar to the existing one, by formatting without colon and backticks.
6f56414 to
459671d
Compare
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
459671d to
9d5ca61
Compare
9d5ca61 to
102b242
Compare
91194ef to
7788ff6
Compare
7788ff6 to
d329dcf
Compare
Record the download-only diagnostic with a local wheel fixture when a workspace member changes without updating the lockfile.
Retain changed package requirements so a subsequent resolution error does not hide why the lockfile needs updating. Preserve the original error and successful lock-check behavior.
d329dcf to
77a0719
Compare
| && let LockSatisfactionError::MismatchedPackageRequirements(..) = | ||
| reason.as_ref() | ||
| { |
There was a problem hiding this comment.
[P3] Signed download URLs can leak through the lock mismatch hint
When a metadata fetch fails during a locked check, the new hint can print a signed URL from an unrelated added or removed requirement. Requirement normalization retains the URL query, and SafeUrl leaves Google Cloud Storage’s X-Goog-Signature intact. If CI logs are visible to someone without access to the private wheel, that reader can download it until the signature expires, even if uv never fetched that wheel during the check.
| && let LockSatisfactionError::MismatchedPackageRequirements(..) = | |
| reason.as_ref() | |
| { | |
| && let LockSatisfactionError::MismatchedPackageRequirements( | |
| package, _, requested, locked, | |
| ) = reason.as_ref() | |
| { | |
| let has_url_query = requested.symmetric_difference(locked).any(|requirement| { | |
| matches!( | |
| &requirement.source, | |
| uv_distribution_types::RequirementSource::Url { location, .. } | |
| if location.query().is_some() | |
| ) | |
| }); | |
| let reason = if has_url_query { | |
| format!("Requirements for `{package}` changed") | |
| } else { | |
| reason.to_string() | |
| }; |
Show added and removed package requirements when a lock check fails while collecting package metadata, so a download failure does not hide why the lockfile is out of date (and we explain why there's network access in the first place).