Skip to content

Add hidden --show-version to uv check#19892

Merged
zsol merged 1 commit into
mainfrom
zsol/uv-check-show-version
Jun 17, 2026
Merged

Add hidden --show-version to uv check#19892
zsol merged 1 commit into
mainfrom
zsol/uv-check-show-version

Conversation

@zsol

@zsol zsol commented Jun 17, 2026

Copy link
Copy Markdown
Member

Summary

Adds hidden uv check --show-version support, matching the existing uv format --show-version convention. The flag now reports Using ty <version> for both TY executable overrides and resolved/downloaded ty binaries, without relying on debug logging or the separate lock-pinning work.

This threads the hidden flag through CLI/settings/check execution and updates focused integration coverage for both version-selection paths.

Mirror uv format's hidden version-reporting flag for uv check. When requested, uv now reports the selected ty version for both TY overrides and downloaded ty binaries without running an extra override version probe only for debug logging.
@zsol
zsol requested a review from Gankra June 17, 2026 13:21
@zsol
zsol marked this pull request as ready for review June 17, 2026 13:22
@zsol
zsol marked this pull request as draft June 17, 2026 13:26
@zsol
zsol marked this pull request as ready for review June 17, 2026 13:29
@zsol
zsol enabled auto-merge (squash) June 17, 2026 14:24
@zsol
zsol merged commit 0370ed4 into main Jun 17, 2026
160 of 164 checks passed
@zsol
zsol deleted the zsol/uv-check-show-version branch June 17, 2026 14:28
@astral-sh-bot

astral-sh-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown

uv test inventory changes

This PR changes the tests when compared with the latest main baseline.

  • Added tests: 1
  • Removed tests: 1
  • Changed suites: 1
uv::project: +1 / -1

Added:

  • uv::project::check::check_ty_version_show_version

Removed:

  • uv::project::check::check_ty_version_pinned_verbose

zsol added a commit that referenced this pull request Jun 24, 2026
`uv check` currently resolves its standalone `ty` executable from uv’s
built-in compatible range, even when the project’s locked development
dependencies select a different version or source.

When `uv.lock` contains an applicable `ty` package, `uv check` now runs
that exact locked package. It first looks in the project’s `dev` group,
then falls back to a direct runtime dependency. With `--no-sync` (or
when `ty` is excluded by the selected dependency groups), uv
materializes only the locked `ty` subgraph into a cached environment
without modifying the project environment.

The precedence order for ty version selection is now:

- the `TY` executable override
- an explicit `--ty-version`
- the applicable `ty` package from `uv.lock` (if any)
- uv’s default constrained range when the lock contains no applicable
`ty` development dependency

This work was split into several focused pull requests, which are now
dependencies of this PR:

-
[[#19907](https://github.com/astral-sh/uv/pull/19907)](https://github.com/astral-sh/uv/pull/19907)
adds the locked-subgraph materialization and cached-installation
primitives this PR uses. This PR is stacked on it.
-
[[#19909](https://github.com/astral-sh/uv/pull/19909)](https://github.com/astral-sh/uv/pull/19909)
makes `uv check --no-sync` perform the normal lock operation while
skipping environment synchronization.
-
[[#19892](https://github.com/astral-sh/uv/pull/19892)](https://github.com/astral-sh/uv/pull/19892)
adds the hidden `uv check --show-version` flag used to verify version
selection.
-
[[#19913](https://github.com/astral-sh/uv/pull/19913)](https://github.com/astral-sh/uv/pull/19913)
moves related `uv check` tests from live PyPI dependencies to
deterministic Packse fixtures.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants