uv/crates/uv-cli/src
konsti 06df95adbf
Workaround for panic due to missing global validation in clap (#14368)
Clap does not perform global validation, so flag that are declared as
overriding can be set at the same time:
https://github.com/clap-rs/clap/issues/6049. This would previously cause
a panic. We work around this by choosing the yes-value always and
writing a warning.

An alternative would be erroring when both are set, but it's unclear to
me if this may break things we want to support. (`UV_OFFLINE=1 cargo run
-q pip --no-offline install tqdm --no-cache` is already banned).

Fixes https://github.com/astral-sh/uv/pull/14299

**Test Plan**

```
$ cargo run -q pip --offline install --no-offline tqdm --no-cache
  warning: Boolean flags on different levels are not correctly supported (https://github.com/clap-rs/clap/issues/6049)
    × No solution found when resolving dependencies:
    ╰─▶ Because tqdm was not found in the cache and you require tqdm, we can conclude that your requirements are unsatisfiable.

        hint: Packages were unavailable because the network was disabled. When the network is disabled, registry packages may only be read from the cache.
```
2025-07-01 13:39:46 -05:00
..
comma.rs Remove trailing commas before brackets (#10740) 2025-01-18 19:56:46 +00:00
compat.rs Turn off clippy::struct_excessive_bools rule (#14102) 2025-06-17 12:18:54 +02:00
lib.rs Require disambiguated relative paths for --index (#14152) 2025-06-25 10:02:06 +02:00
options.rs Workaround for panic due to missing global validation in clap (#14368) 2025-07-01 13:39:46 -05:00
version.rs Bump MSRV to 1.85 and Edition 2024 (#13516) 2025-05-18 19:38:43 -04:00