Skip to content

[dont merge]: modernize uv extension by using the mode=bazel-runfiles#939

Draft
xangcastle wants to merge 14 commits into
mainfrom
xangcastle/modernize-uv-extension
Draft

[dont merge]: modernize uv extension by using the mode=bazel-runfiles#939
xangcastle wants to merge 14 commits into
mainfrom
xangcastle/modernize-uv-extension

Conversation

@xangcastle
Copy link
Copy Markdown
Member

@xangcastle xangcastle commented Apr 18, 2026

work in progress

@aspect-workflows
Copy link
Copy Markdown

aspect-workflows Bot commented Apr 18, 2026

Bazel 8 (Test)

⚠️ Buildkite build #3308 failed.

@@+uv+project__aspect_rules_py//private/markers:_f1406cfc2f85641e883d3ba9c27a964444fb80b1_impl failed to build

in _decide_marker rule
@@+uv+project__aspect_rules_py//private/markers:_f1406cfc2f85641e883d3ba9c27a964444fb80b1_impl:
Traceback (most recent call last):
	File "/mnt/ephemeral/workdir/aspect-build/rules_py/uv/private/markers/defs.bzl", line 50, column 27, in
_decide_marker_impl
		res = _evaluate_marker(
	File "/mnt/ephemeral/workdir/aspect-build/rules_py/uv/private/markers/pep508_evaluate.bzl", line 123, column
27, in evaluate
		tokens = ast.parse(env = env, tokens = tokens, strict = strict)
	File "/mnt/ephemeral/workdir/aspect-build/rules_py/uv/private/markers/pep508_evaluate.bzl", line 202, column
40, in lambda
		parse = lambda **kwargs: _parse(self, **kwargs),
	File "/mnt/ephemeral/workdir/aspect-build/rules_py/uv/private/markers/pep508_evaluate.bzl", line 227, column
27, in _parse
		expr = marker_expr(env = env, strict = strict, *tokens[:3])
	File "/mnt/ephemeral/workdir/aspect-build/rules_py/uv/private/markers/pep508_evaluate.bzl", line 284, column
29, in marker_expr
		return _version_expr(left, op, right)
	File "/mnt/ephemeral/workdir/aspect-build/rules_py/uv/private/markers/pep508_evaluate.bzl", line 303, column
18, in _version_expr
		left = semver(left)
	File "/mnt/ephemeral/workdir/aspect-build/rules_py/uv/private/markers/semver.bzl", line 131, column 20, in
semver
		major = int(major),
Error in int: empty string

@@+uv+project__aspect_rules_py//private/sccs:_maybe__02c60fe71555dbc6__406189b2fa92c520 failed to build

errors encountered resolving select() keys for
@@+uv+project__aspect_rules_py//private/sccs:_maybe__02c60fe71555dbc6__406189b2fa92c520

@@+uv+project__aspect_rules_py//private/sccs:_maybe__1e0e56026e400a78__520b4425048c4c29 failed to build

errors encountered resolving select() keys for
@@+uv+project__aspect_rules_py//private/sccs:_maybe__1e0e56026e400a78__520b4425048c4c29

//examples/py_pex_binary:binary failed to build

in deps attribute of py_binary rule //examples/py_pex_binary:binary:
'@@bazel_tools//tools/python/runfiles:runfiles' does not have mandatory providers: 'AspectPyInfo' or
'PyVirtualInfo' or 'CcInfo'. Since this rule was created by the macro 'py_binary', the error might have been
caused by the macro implementation

//uv/private/gazelle_manifest:update.sh failed to build

error loading package 'uv/private/gazelle_manifest': at
/mnt/ephemeral/workdir/aspect-build/rules_py/py/private/py_venv/defs.bzl:3:6: initialization of module
'py/private/py_venv/py_venv.bzl' failed

14 other actions failed to build.

Failed tests (1)
//py/tests/import-pathing:py_library_import_pathing_test_suite_test_0 [k8-fastbuild]                 🔗

💡 To reproduce the build failures, run

bazel build @@+uv+project__aspect_rules_py//private/markers:_f1406cfc2f85641e883d3ba9c27a964444fb80b1_impl @@+uv+project__aspect_rules_py//private/sccs:_maybe__02c60fe71555dbc6__406189b2fa92c520 @@+uv+project__aspect_rules_py//private/sccs:_maybe__1e0e56026e400a78__520b4425048c4c29 //examples/py_pex_binary:binary //uv/private/gazelle_manifest:update.sh

💡 To reproduce the test failures, run

bazel test //py/tests/import-pathing:py_library_import_pathing_test_suite_test_0

Bazel 9 (Test)

⚠️ Buildkite build #3308 failed.

//uv/private/markers:_test_tomli_impl failed to build

in _decide_marker rule //uv/private/markers:_test_tomli_impl:
Traceback (most recent call last):
	File "/mnt/ephemeral/workdir/aspect-build/rules_py/uv/private/markers/defs.bzl", line 50, column 27, in
_decide_marker_impl
		res = _evaluate_marker(
	File "/mnt/ephemeral/workdir/aspect-build/rules_py/uv/private/markers/pep508_evaluate.bzl", line 123, column
27, in evaluate
		tokens = ast.parse(env = env, tokens = tokens, strict = strict)
	File "/mnt/ephemeral/workdir/aspect-build/rules_py/uv/private/markers/pep508_evaluate.bzl", line 202, column
40, in lambda
		parse = lambda **kwargs: _parse(self, **kwargs),
	File "/mnt/ephemeral/workdir/aspect-build/rules_py/uv/private/markers/pep508_evaluate.bzl", line 227, column
27, in _parse
		expr = marker_expr(env = env, strict = strict, *tokens[:3])
	File "/mnt/ephemeral/workdir/aspect-build/rules_py/uv/private/markers/pep508_evaluate.bzl", line 284, column
29, in marker_expr
		return _version_expr(left, op, right)
	File "/mnt/ephemeral/workdir/aspect-build/rules_py/uv/private/markers/pep508_evaluate.bzl", line 303, column
18, in _version_expr
		left = semver(left)
	File "/mnt/ephemeral/workdir/aspect-build/rules_py/uv/private/markers/semver.bzl", line 131, column 20, in
semver
		major = int(major),
Error in int: empty string

//py:extensions.doc_extract failed to build

in deps attribute of starlark_doc_extract rule //py:extensions.doc_extract: missing bzl_library targets for
Starlark module(s) //py/private/interpreter:extension.bzl. Since this rule was created by the macro
'bzl_library', the error might have been caused by the macro implementation

//py/tests/external-deps:run_click_cli_binary failed to build

bash failed: error executing Genrule command (from genrule rule target //py/tests/external-deps:run_click_cli_binary) /bin/bash -c ... (remaining 1 argument skipped)
 
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
 
Traceback (most recent call last):
  File "/mnt/ephemeral/output/rules_py/__main__/sandbox/linux-sandbox/163/execroot/_main/bazel-out/k8-opt-exec/bin/py/tests/external-deps/click_binary.runfiles/_main/py/tests/external-deps/custom-macro/__main__.py", line 1, in <module>
    import click
ModuleNotFoundError: No module named 'click'

//py/tests/external-deps:run_click failed to build

bash failed: error executing Genrule command (from genrule rule target //py/tests/external-deps:run_click) /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/k8-opt-exec/bin/py/tests/external-deps/click --count 314 > bazel-out/k8-fastbuild/bin/py/tests/external-deps/click_out'
 
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
 
Traceback (most recent call last):
  File "/mnt/ephemeral/output/rules_py/__main__/sandbox/linux-sandbox/166/execroot/_main/bazel-out/k8-opt-exec/bin/py/tests/external-deps/click.runfiles/_main/py/tests/external-deps/custom-macro/__main__.py", line 1, in <module>
    import click
ModuleNotFoundError: No module named 'click'

//py/tests/py-pex-binary:print_modules_pex failed to build

pex failed: error executing PyPex command (from py_pex_binary rule target //py/tests/py-pex-binary:print_modules_pex) bazel-out/k8-opt-exec/bin/py/tools/pex/pex @bazel-out/k8-fastbuild/bin/py/tests/py-pex-binary/print_modules_pex.pex-0.params
 
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
 
Could not determine the `main` file for the binary. Did run.tmpl.sh change?

14 other actions failed to build.

Failed tests (1)
//py/tests/import-pathing:py_library_import_pathing_test_suite_test_0 [k8-fastbuild]                 🔗

💡 To reproduce the build failures, run

bazel build //uv/private/markers:_test_tomli_impl //py:extensions.doc_extract //py/tests/external-deps:run_click_cli_binary //py/tests/external-deps:run_click //py/tests/py-pex-binary:print_modules_pex

💡 To reproduce the test failures, run

bazel test //py/tests/import-pathing:py_library_import_pathing_test_suite_test_0

Bazel 8 (Test)

e2e

⚠️ Buildkite build #3308 failed.


Bazel 9 (Test)

e2e

⚠️ Buildkite build #3308 failed.


Bazel 8 (Test)

examples/uv_pip_compile

All tests were cache hits

1 test (100.0%) was fully cached saving 444ms.


Buildifier

Buildifier managed files require formatting

--- ./e2e/cases/uv-conflict-tilde-856/BUILD.bazel	2026-04-24 23:15:03.435732257 +0000
+++ /tmp/buildifier-tmp-1341573521	2026-04-24 23:15:41.303333601 +0000
@@ -2,9 +2,9 @@
 
 py_test(
     name = "test_a",
-    python_version = "3.11",
     srcs = ["test_a.py"],
     main = "test_a.py",
+    python_version = "3.11",
     venv = "tilde-a",
     deps = [
         "@pypi//packaging",
@@ -13,9 +13,9 @@
 
 py_test(
     name = "test_b",
-    python_version = "3.11",
     srcs = ["test_b.py"],
     main = "test_b.py",
+    python_version = "3.11",
     venv = "tilde-b",
     deps = [
         "@pypi//packaging",
--- ./e2e/cases/pytest-mock-530/BUILD.bazel	2026-04-24 23:15:03.435732257 +0000
+++ /tmp/buildifier-tmp-4002052056	2026-04-24 23:15:41.311333517 +0000
@@ -3,9 +3,9 @@
 # Regression test for #530: pytest-mock plugin must be discoverable.
 py_test(
     name = "test_mock_py_test",
-    python_version = "3.11",
     srcs = ["test_mock.py"],
     pytest_main = True,
+    python_version = "3.11",
     venv = "pytest-mock-530",
     deps = [
         "@pypi//pytest",
@@ -15,12 +15,12 @@
 
 py_test(
     name = "test_mock_py_venv_test",
-    python_version = "3.11",
     srcs = [
         "__test__.py",
         "test_mock.py",
     ],
     main = "__test__.py",
+    python_version = "3.11",
     venv = "pytest-mock-530",
     deps = [
         "@pypi//pytest",
--- ./e2e/cases/pytest-subdir-imports/BUILD.bazel	2026-04-24 23:15:03.435732257 +0000
+++ /tmp/buildifier-tmp-3991071825	2026-04-24 23:15:41.319333433 +0000
@@ -8,9 +8,9 @@
 
 py_test(
     name = "test_subdir_import",
-    python_version = "3.11",
     srcs = ["tests/test_subdir.py"],
     pytest_main = True,
+    python_version = "3.11",
     venv = "pytest-subdir-imports",
     deps = [
         ":lib",
--- ./e2e/cases/root-dir-paths-538/BUILD.bazel	2026-04-24 23:15:03.435732257 +0000
+++ /tmp/buildifier-tmp-2230635383	2026-04-24 23:15:41.327333348 +0000
@@ -1,5 +1,4 @@
 load("@aspect_rules_py//py:defs.bzl", "

... 6367 chars truncated

💡 Run the following to apply the suggested formatting fixes

bazel run //:buildifier

@xangcastle xangcastle changed the title poc: modernize uv extension [dont merge]: modernize uv extension Apr 18, 2026
…rt local cross compile and RBE cross compile
@xangcastle xangcastle changed the title [dont merge]: modernize uv extension [dont merge]: modernize uv extension by using the mode=bazel-runfiles Apr 19, 2026
# Conflicts:
#	e2e/cases/unconstrained-dependencies/BUILD.bazel
#	py/extensions.bzl
#	uv/private/extension/projectfile.bzl
#	uv/private/extension/test_projectfile.bzl
#	uv/private/host/extension.bzl
#	uv/private/uv_hub/repository.bzl
#	uv/private/uv_project/repository.bzl
@xangcastle xangcastle closed this Apr 28, 2026
@xangcastle xangcastle reopened this May 12, 2026
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.

1 participant