uv/crates
Zanie Blue 42dac85bf7
Remove commands available in the top-level from the suggested subcommand error (#8316)
Part of https://github.com/astral-sh/uv/issues/8313

I think we'll need to open an issue upstream to add more context to the
error here, because there's not sufficient information about the parent
command to provide a good error message. As a first step, let's avoid
giving these suggestions for subcommands that overlap with our top-level
commands.. because that's just confusing.

Here's all the information we have here

```rust
[crates/uv/src/lib.rs:1530:13] &err = ErrorInner {
    kind: InvalidSubcommand,
    context: FlatMap {
        keys: [
            InvalidSubcommand,
            Usage,
        ],
        values: [
            String(
                "remove",
            ),
            StyledStr(
                StyledStr(
                    "\u{1b}[1m\u{1b}[32mUsage:\u{1b}[0m \u{1b}[1m\u{1b}[36muv python\u{1b}[0m \u{1b}[36m[OPTIONS]\u{1b}[0m \u{1b}[36m<COMMAND>\u{1b}[0m",
                ),
            ),
        ],
    },
    message: None,
    source: None,
    help_flag: Some(
        "--help",
    ),
    styles: Styles {
        header: Style {
            fg: Some(
                Ansi(
                    Green,
                ),
            ),
            bg: None,
            underline: None,
            effects: Effects(BOLD),
        },
        error: Style {
            fg: Some(
                Ansi(
                    Red,
                ),
            ),
            bg: None,
            underline: None,
            effects: Effects(BOLD),
        },
        usage: Style {
            fg: Some(
                Ansi(
                    Green,
                ),
            ),
            bg: None,
            underline: None,
            effects: Effects(BOLD),
        },
        literal: Style {
            fg: Some(
                Ansi(
                    Cyan,
                ),
            ),
            bg: None,
            underline: None,
            effects: Effects(BOLD),
        },
        placeholder: Style {
            fg: Some(
                Ansi(
                    Cyan,
                ),
            ),
            bg: None,
            underline: None,
            effects: Effects(),
        },
        valid: Style {
            fg: Some(
                Ansi(
                    Green,
                ),
            ),
            bg: None,
            underline: None,
            effects: Effects(),
        },
        invalid: Style {
            fg: Some(
                Ansi(
                    Yellow,
                ),
            ),
            bg: None,
            underline: None,
            effects: Effects(),
        },
    },
    color_when: Auto,
    color_help_when: Auto,
    backtrace: None,
}
```
2024-10-18 10:57:07 -05:00
..
uv Remove commands available in the top-level from the suggested subcommand error (#8316) 2024-10-18 10:57:07 -05:00
uv-auth Fixup HTTP_BASIC reference in docstring (#8314) 2024-10-17 19:37:06 -05:00
uv-bench Avoid showing lower-bound warning outside of explicit lock and sync (#8234) 2024-10-15 20:49:40 -04:00
uv-build-backend Mock uv version in build backend tests (#8205) 2024-10-15 09:27:33 +00:00
uv-build-frontend Respect relative paths in uv build sources (#8237) 2024-10-16 01:46:29 +00:00
uv-cache Run uv build builds in the source distribution bucket (#8220) 2024-10-15 13:29:50 -04:00
uv-cache-info Allow users to incorporate Git tags into dynamic cache keys (#8259) 2024-10-16 11:13:29 -04:00
uv-cache-key chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-cli Add templates for popular build backends (#7857) 2024-10-16 14:19:59 +02:00
uv-client Add more context on resolve client error (#8285) 2024-10-17 08:22:09 -04:00
uv-configuration Add templates for popular build backends (#7857) 2024-10-16 14:19:59 +02:00
uv-console Support interactive input in uv publish (#8158) 2024-10-15 10:00:43 +02:00
uv-dev Remove trailing newlines in error messages (#8322) 2024-10-18 17:17:41 +02:00
uv-dispatch Respect relative paths in uv build sources (#8237) 2024-10-16 01:46:29 +00:00
uv-distribution Improve sources deserialization errors (#8308) 2024-10-17 21:33:04 +00:00
uv-distribution-filename chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-distribution-types Show hint in resolution failure on Forbidden (403) or Unauthorized (401) (#8264) 2024-10-16 17:34:29 +00:00
uv-extract chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-fs Patch Python executable name for Windows free-threaded builds (#8310) 2024-10-17 18:27:55 -05:00
uv-git Reuse the result of which git (#8224) 2024-10-15 13:50:43 -04:00
uv-install-wheel Narrow what the pip3.<minor> logic drops from entry points. (#8273) 2024-10-16 21:33:13 -04:00
uv-installer Use more precise error messages for preparation failures 2024-10-16 22:08:45 -04:00
uv-macros chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-metadata chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-normalize chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-once-map Use shared resolver state between add and lock (#8146) 2024-10-12 14:58:07 +00:00
uv-options-metadata chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-pep440 Make rkyv optional in pep440-rs (#8249) 2024-10-16 12:15:51 +00:00
uv-pep508 Fix error leading to out-of-bound panic in uv-pep508 (#8282) 2024-10-17 08:22:58 -04:00
uv-performance-flate2-backend Add a FreeBSD build to CI (#8269) 2024-10-17 15:24:21 +00:00
uv-performance-memory-allocator chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-platform-tags chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-pubgrub chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-publish Publish: Workaround using raw filename (#8204) 2024-10-15 14:22:52 +02:00
uv-pypi-types Redact index sources in uv.lock (#8333) 2024-10-18 11:20:15 -04:00
uv-python Patch Python executable name for Windows free-threaded builds (#8310) 2024-10-17 18:27:55 -05:00
uv-requirements Remove the flat index types (#7759) 2024-10-15 23:30:37 +00:00
uv-requirements-txt chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-resolver Don't prefetch unreachable packages (#8246) 2024-10-18 13:44:24 +02:00
uv-scripts Add support for named and explicit indexes (#7481) 2024-10-15 18:24:23 -04:00
uv-settings Allow users to incorporate Git tags into dynamic cache keys (#8259) 2024-10-16 11:13:29 -04:00
uv-shell chore: unify all env vars used (#8151) 2024-10-14 16:48:13 -05:00
uv-state chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-static Respect UV_INDEX_ rather than UV_HTTP_BASIC_ (#8306) 2024-10-17 21:42:04 +00:00
uv-tool chore: unify all env vars used (#8151) 2024-10-14 16:48:13 -05:00
uv-trampoline chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-types Respect relative paths in uv build sources (#8237) 2024-10-16 01:46:29 +00:00
uv-version Bump version to 0.4.24 (#8312) 2024-10-17 18:50:13 -05:00
uv-virtualenv chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-warnings chore: Move all integration tests to a single binary (#8093) 2024-10-11 16:41:35 +02:00
uv-workspace Improve sources deserialization errors (#8308) 2024-10-17 21:33:04 +00:00
README.md Rename uv-build to uv-build-frontend (#7688) 2024-09-25 14:17:54 -04:00

Crates

bench

Functionality for benchmarking uv.

cache-key

Generic functionality for caching paths, URLs, and other resources across platforms.

distribution-filename

Parse built distribution (wheel) and source distribution (sdist) filenames to extract structured metadata.

distribution-types

Abstractions for representing built distributions (wheels) and source distributions (sdists), and the sources from which they can be downloaded.

install-wheel-rs

Install built distributions (wheels) into a virtual environment.]

once-map

A waitmap-like concurrent hash map for executing tasks exactly once.

pep440-rs

Utilities for interacting with Python version numbers and specifiers.

pep508-rs

Utilities for interacting with PEP 508 dependency specifiers.

platform-host

Functionality for detecting the current platform (operating system, architecture, etc.).

platform-tags

Functionality for parsing and inferring Python platform tags as per PEP 425.

uv

Command-line interface for the uv package manager.

uv-build-frontend

A PEP 517-compatible build frontend for uv.

uv-cache

Functionality for caching Python packages and associated metadata.

uv-client

Client for interacting with PyPI-compatible HTTP APIs.

uv-dev

Development utilities for uv.

uv-dispatch

A centralized struct for resolving and building source distributions in isolated environments. Implements the traits defined in uv-types.

uv-distribution

Client for interacting with built distributions (wheels) and source distributions (sdists). Capable of fetching metadata, distribution contents, etc.

uv-extract

Utilities for extracting files from archives.

uv-fs

Utilities for interacting with the filesystem.

uv-git

Functionality for interacting with Git repositories.

uv-installer

Functionality for installing Python packages into a virtual environment.

uv-python

Functionality for detecting and leveraging the current Python interpreter.

uv-normalize

Normalize package and extra names as per Python specifications.

uv-package

Types and functionality for working with Python packages, e.g., parsing wheel files.

uv-requirements

Utilities for reading package requirements from pyproject.toml and requirements.txt files.

uv-resolver

Functionality for resolving Python packages and their dependencies.

uv-shell

Utilities for detecting and manipulating shell environments.

uv-types

Shared traits for uv, to avoid circular dependencies.

pypi-types

General-purpose type definitions for types used in PyPI-compatible APIs.

uv-virtualenv

A venv replacement to create virtual environments in Rust.

uv-warnings

User-facing warnings for uv.

uv-workspace

Workspace abstractions for uv.

requirements-txt

Functionality for parsing requirements.txt files.