Skip to content

Commit 1d9b656

Browse files
authored
fix(uv): Ensure normalization of build dep names (#742)
For consistency with the main uv.lock loading code and to avoid failures to join annotations with their requirements we need to apply normalization here. Otherwise we can generate a build graph with inconsistent annotative deps. ### Changes are visible to end-users: yes - Searched for relevant documentation and updated as needed: yes - Breaking change (forces users to change their own code or config): yes - Suggested release notes appear below: yes Fixed the UV extension not normalizing annotative dependencies' names, potentially leading to false missing definition errors. ### Test plan - Manual testing
1 parent 50bf6e1 commit 1d9b656

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

uv/private/extension.bzl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,10 @@ def _parse_annotations(module_ctx, hub_specs, venv_specs):
310310
if package["name"] in annotation_specs[ann.hub_name][ann.venv_name].per_package:
311311
fail("Annotation conflict! Package %s is annotated in venv %s multiple times!" % (package["name"], ann.venv_name))
312312

313+
if "build-dependencies" in package:
314+
for it in package["build-dependencies"]:
315+
it["name"] = normalize_name(it["name"])
316+
313317
annotation_specs[ann.hub_name][ann.venv_name].per_package[package["name"]] = package
314318

315319
return annotation_specs

0 commit comments

Comments
 (0)