-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Using tool.uv.environments with an index that mismatches those environments creates a lockfile with an entry with no distributions. The resolution should instead fail.
[project]
name = "uv-reproducer"
version = "0.1.0"
requires-python = "==3.13.*"
dependencies = [
"charset-normalizer==3.4.4",
]
[[tool.uv.index]]
url = "./platform-mismatch"
format = "flat"
[[tool.uv.index]]
url = "./default"
format = "flat"
[tool.uv]
environments = ["sys_platform == 'linux'"]version = 1
revision = 3
requires-python = "==3.13.*"
resolution-markers = [
"sys_platform == 'linux'",
]
supported-markers = [
"sys_platform == 'linux'",
]
[[package]]
name = "charset-normalizer"
version = "3.4.4"
source = { registry = "platform-mismatch" }
[[package]]
name = "uv-reproducer"
version = "0.1.0"
source = { virtual = "." }
dependencies = [
{ name = "charset-normalizer", marker = "sys_platform == 'linux'" },
]
[package.metadata]
requires-dist = [{ name = "charset-normalizer", specifier = "==3.4.4" }]To reproduce:
pushd default/
# Source file for charset-normalizer
curl -O https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz
# And of course we need setuptools
curl -O https://files.pythonhosted.org/packages/a3/dc/17031897dae0efacfea57dfd3a82fdd2a2aeb58e0ff71b77b87e44edc772/setuptools-80.9.0-py3-none-any.whl
popd
# Works so long as you're not on a Windows on ARM host
pushd platform-mismatch/
curl -O https://files.pythonhosted.org/packages/af/8f/3ed4bfa0c0c72a7ca17f0380cd9e4dd842b09f664e780c13cff1dcf2ef1b/charset_normalizer-3.4.4-cp313-cp313-win_arm64.whl
popd
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels