Skip to content

Confusing warning - resolution-strategy #8967

@KasperZutterman

Description

@KasperZutterman

Issue

Warning message contains --resolution-strategy, which is not a valid option.
It should be --resolution instead (docs).

Warning got added here: #5953

Example

pyproject.toml:

[project]
name = "test"
version = "0.0.1"
dependencies = [
    "urllib3",
]

Command:

uv pip compile pyproject.toml -o requirements.txt --resolution=lowest

Output:

⠙ Resolving dependencies... 
warning: The direct dependency `urllib3` is unpinned. Consider setting a lower bound when using `--resolution-strategy lowest` to avoid using outdated versions.
Resolved 1 package in 1.30s
# This file was autogenerated by uv via the following command:
#    uv pip compile pyproject.toml -o requirements.txt --resolution lowest
urllib3==0.3
    # via test (pyproject.toml)

Expected warning:

warning: The direct dependency `urllib3` is unpinned. Consider setting a lower bound when using `--resolution lowest` to avoid using outdated versions.

$ uv --version
uv 0.4.25 (97eb6ab4a 2024-10-21)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingerror messagesMessaging when something goes wrong

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions