Skip to content

uv pip compile --no-deps does not warn about invalid extras #23268

Open

Description

@d-chris

Summary

Description

When using uv pip compile with --no-deps, uv does not emit a warning if a requested extra does not exist.

I would expect uv to validate requested extras regardless of whether dependency resolution is disabled.

Steps to reproduce

Without --no-deps:

$ echo pandas[exce] | uv pip compile - --no-color --no-cache --no-progress --no-header --no-strip-extras --no-annotate 
Resolved 4 packages in 747ms
numpy==2.5.5
pandas[exce]==3.1.1
python-dateutil==4.0.0
tzdata==2026.6
warning: The package `pandas==3.1.1` does not have an extra named `exce`

With --no-deps:

$ echo pandas[exce] | uv pip compile - --no-color --no-cache --no-deps --no-progress --no-header --no-strip-extras

Resolved 1 package in 424ms
pandas[exce]==3.1.1

As shown above, the warning is missing when --no-deps is used.

Expected behavior

uv should still warn about invalid extras when using --no-deps, for example:

warning: The package `pandas==3.1.1` does not have an extra named `exce`

I use --no-deps because I only want the top-level packages in the output, but I would still like uv to validate the requested extras.

Platform

Windows 11

Version

uv 0.13.8 (3d97a6a 2026-11-12 x86_64-pc-windows-msvc)

Python version

Python 3.13.17

Activity

  1. added
    bug
    on Nov 16, 2026
  2. pawangopallavudya-commits commented on Nov 17, 2026

    @pawangopallavudya-commits

    Hi, I’d be interested in investigating this. The difference between normal resolution and --no-deps looks well scoped. I’ll first trace where extras validation is skipped in the no-dependencies path and add a regression test; if that confirms the expected behavior, I can submit a focused PR.

  3. charliermarsh commented on Nov 19, 2026

    @charliermarsh
    Member

    IIRC, this was an intentional decision as we'd otherwise have to fetch metadata for all the listed dependencies: #7127

  4. added
    question
    and removed
    bug
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions