Repository navigation
Retain and respect settings in tool upgrades - #5937
Conversation
There was a problem hiding this comment.
I don't know, I guess? So the receipt represents the "most recent" settings.
There was a problem hiding this comment.
fwiw for the lockfile we only write non-default values
There was a problem hiding this comment.
I think updating here makes sense.
There was a problem hiding this comment.
Hard to say what the right behavior is here. We could also consider discarding the tool whenever settings differ.
There was a problem hiding this comment.
This is really tough. It seems okay to change after some user feedback. I'm leaning towards consistent --upgrade / --reinstall semantics where it is required to change the versions. This matches uv pip install, yes?
There was a problem hiding this comment.
Now that we have upgrade, I'm sort of open to making install more aggressive about replacing though.
There was a problem hiding this comment.
So we could make it replace whenever the settings or versions differ...
There was a problem hiding this comment.
We go through some effort to avoid adding --upgrade to tool receipts. Does that seem right? Otherwise, uv tool install black --upgrade saves upgrade in the receipt...
ac8b266 to
8dc4c57
Compare
There was a problem hiding this comment.
fwiw for the lockfile we only write non-default values
|
I will review this morning. |
|
Would most appreciate review of the correct / desired behaviors. |
There was a problem hiding this comment.
Aside: We should probably open an issue to define a macro for this, since it's non-trivial and repeated.
There was a problem hiding this comment.
Yeah good idea. I can do it.
|
Sorry got half way through this then had meetings and forgot — reading now. |
e609011 to
492088e
Compare
Force upgrade Make settings serializable Rebase
492088e to
4cf3560
Compare
CodSpeed Performance ReportMerging #5937 will degrade performances by 11.18%Comparing Summary
Benchmarks breakdown
|
The resolved `IndexLocations` type still implements Serde even though configuration and tool receipts serialize their input options instead. These derives were added alongside the resolved tool settings in #5937; the parent settings derives were removed in #7442. Remove the unused implementation without changing configuration or receipt formats. Co-authored-by: zaniebot <[email protected]>
Summary
We now persist the
ResolverInstallerOptionswhen writing out a tool receipt. When upgrading, we grab the saved options, and merge with the command-line arguments and user-level filesystem settings (CLI > receipt > filesystem).