mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-28 18:54:10 +00:00
Make --reinstall imply --refresh (#5425)
## Summary It's hard for me to imagine a scenario in which a user passed `--reinstall`, but wanted us to keep respecting cached data for a package. For example, to actually "rebuild and reinstall" an editable today, you have to pass both `--reinstall` and `--refresh`. This PR makes `--reinstall` imply `--refresh`, so we always validate that the cached data is fresh. Closes https://github.com/astral-sh/uv/issues/5424.
This commit is contained in:
parent
4d9098a1d7
commit
d0919329fd
10 changed files with 114 additions and 23 deletions
|
|
@ -380,7 +380,7 @@ pub struct ResolverInstallerOptions {
|
|||
"#
|
||||
)]
|
||||
pub upgrade_package: Option<Vec<Requirement<VerbatimParsedUrl>>>,
|
||||
/// Reinstall all packages, regardless of whether they're already installed.
|
||||
/// Reinstall all packages, regardless of whether they're already installed. Implies `refresh`.
|
||||
#[option(
|
||||
default = "false",
|
||||
value_type = "bool",
|
||||
|
|
@ -389,7 +389,8 @@ pub struct ResolverInstallerOptions {
|
|||
"#
|
||||
)]
|
||||
pub reinstall: Option<bool>,
|
||||
/// Reinstall a specific package, regardless of whether it's already installed.
|
||||
/// Reinstall a specific package, regardless of whether it's already installed. Implies
|
||||
/// `refresh-package`.
|
||||
#[option(
|
||||
default = "[]",
|
||||
value_type = "list[str]",
|
||||
|
|
@ -1056,7 +1057,7 @@ pub struct PipOptions {
|
|||
"#
|
||||
)]
|
||||
pub upgrade_package: Option<Vec<Requirement<VerbatimParsedUrl>>>,
|
||||
/// Reinstall all packages, regardless of whether they're already installed.
|
||||
/// Reinstall all packages, regardless of whether they're already installed. Implies `refresh`.
|
||||
#[option(
|
||||
default = "false",
|
||||
value_type = "bool",
|
||||
|
|
@ -1065,7 +1066,8 @@ pub struct PipOptions {
|
|||
"#
|
||||
)]
|
||||
pub reinstall: Option<bool>,
|
||||
/// Reinstall a specific package, regardless of whether it's already installed.
|
||||
/// Reinstall a specific package, regardless of whether it's already installed. Implies
|
||||
/// `refresh-package`.
|
||||
#[option(
|
||||
default = "[]",
|
||||
value_type = "list[str]",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue