)]}'
{
  "commit": "44eb677dce5ff532e11a5181afafc913fcd8f34c",
  "tree": "5e04ca29ec5662d846ae232d3a841f213a2318a0",
  "parents": [
    "6d04d7bddfd68f429984997446838e17726cc86b"
  ],
  "author": {
    "name": "Richard Levasseur",
    "email": "richardlev@gmail.com",
    "time": "Tue Oct 27 05:21:35 2026 +0000"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Oct 27 05:21:35 2026 +0000"
  },
  "message": "feat(uv): support WORKSPACE builds in the lock() macro (#4360)\n\nThis makes the uv `lock()` rule work in workspace mode. Since we\u0027ll\nbe supporting Bazel 8 for another year, and I\u0027d really like to get\nrid of the remaining requirements.txt and compile_pip_requirements\ncalls, I figured we should just implement workspace support for it.\n\nThis is a fairly low-effort conversion of the bzlmod APIs to\nworkspace mode. Fundamentally, the bzlmod API works by obtaining\none or more manifests, then using the manifest information to\ndefine repos with the uv binaries. Then the names of all those\nrepos are fed into the toolchain hub where the `toolchain()`\nregistrations are.\n\nThe workspace API more-or-less exposes that same API.\n\nThe `uv_toolchain_manifest()` function is the equivalent of the\nfirst half of the bzlmod phase. All it does is download the\nmanifests so they can be read by subsequent workspace macros\nand repos. Like the bzlmod API, a manifest per uv version can\nbe registered.\n\nThe `uv_register_toolchains()` function is the equivalent of the\nsecond half of the bzlmod phase. It takes what\u0027s in the manifest\nand defines repos pointing to a particular URL. Like the bzlmod\nAPI, it accepts args to customize processing. This function also\nkeeps track of all the created toolchain implementations and\ncreates the toolchain hub with all the `toolchain()` registrations.\n\nThe args to the functions mirror the bzlmod API, which is basically\na list of key-values. Hence the `uv_register_toolchains.configure`\narg accepts a list of dicts, where the keys are the same as the\nattributes of the `uv.configure` tag class. This makes for a\nsomewhat awkward API, but it matches the bzlmod API and makes it\neasier to integrate into the underlying code.\n\nTested on Bazel 7.x and 8.x in WORKSPACE mode, and on Bazel 7.x, 8.x\nand 9.x in bzlmod mode (Bazel 9 no longer evaluates WORKSPACE).\n\nWork towards #1975",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "46b26b8a9a9bf34c89c7d49a137e233fee6988a5",
      "old_mode": 33188,
      "old_path": "WORKSPACE",
      "new_id": "016a9a9d7ed6eed4d2807ba010a6194e053355cf",
      "new_mode": 33188,
      "new_path": "WORKSPACE"
    },
    {
      "type": "modify",
      "old_id": "b0217c121cacb1db8242bb9fb9c1fd9682ba6233",
      "old_mode": 33188,
      "old_path": "docs/BUILD.bazel",
      "new_id": "4eb0f926f74d9d96cbe58b98bc542e157d5f58e6",
      "new_mode": 33188,
      "new_path": "docs/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "78c88c5f46b3ed5043e36c8c83f3008e5857c97b",
      "old_mode": 33188,
      "old_path": "docs/pypi/lock.md",
      "new_id": "727795c1efbd5c6e4fad1b79b932217334ee8925",
      "new_mode": 33188,
      "new_path": "docs/pypi/lock.md"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "36487e6d0854e286354f1b1fd7532eb92cd953f0",
      "new_mode": 33188,
      "new_path": "news/1975.added.md"
    },
    {
      "type": "modify",
      "old_id": "40c489a57f1b332244b7294275f1726e739bf0a4",
      "old_mode": 33188,
      "old_path": "python/uv/BUILD.bazel",
      "new_id": "9551051bd25992f4961aa262a5f7852d412ffcda",
      "new_mode": 33188,
      "new_path": "python/uv/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "e10741948c966b42efe3e7de1bb4b46fe40bacd8",
      "old_mode": 33188,
      "old_path": "python/uv/private/BUILD.bazel",
      "new_id": "e4e652ae78f51946e3a501facc0906bd2147e862",
      "new_mode": 33188,
      "new_path": "python/uv/private/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a03cf7961f9c3404fd1598d2113fde849a4d2b7a",
      "new_mode": 33188,
      "new_path": "python/uv/private/dist_manifest.bzl"
    },
    {
      "type": "modify",
      "old_id": "c0ad8bf8d30ed90587dda1f7f92cf4408b18c3d0",
      "old_mode": 33188,
      "old_path": "python/uv/private/lock.bzl",
      "new_id": "84e4cbbc1293cb2534107dfa9182b751bfd7229d",
      "new_mode": 33188,
      "new_path": "python/uv/private/lock.bzl"
    },
    {
      "type": "modify",
      "old_id": "bd35624c4c37ccbfe8a938850ae5e2f50c794ac1",
      "old_mode": 33188,
      "old_path": "python/uv/private/uv.bzl",
      "new_id": "1ed9794316c5a09ba6992d0fad48c7677d1751d0",
      "new_mode": 33188,
      "new_path": "python/uv/private/uv.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d50cec92c19967e9e53e51abd9eb2b8eaa81a504",
      "new_mode": 33188,
      "new_path": "python/uv/private/uv_defaults.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1da301159e794d5a10c1bfc9d239b6f46baf3849",
      "new_mode": 33188,
      "new_path": "python/uv/private/uv_register_toolchains.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e8f7f5b8f76f5a049ba30ade68e3711d0489e5cd",
      "new_mode": 33188,
      "new_path": "python/uv/private/uv_toolchain_config.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b55d32f5a94aee84f808b29d6df19d4aae1eddb3",
      "new_mode": 33188,
      "new_path": "python/uv/private/uv_toolchains_manifest.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e68678e11ae7c79957461df1d04e252d7db8eddd",
      "new_mode": 33188,
      "new_path": "python/uv/repositories.bzl"
    },
    {
      "type": "modify",
      "old_id": "21ef8fad1609bbe7a512ae9f9e4fcd3008693aff",
      "old_mode": 33188,
      "old_path": "tests/integration/BUILD.bazel",
      "new_id": "9e909dc45be2e53f7de6456bec6778691ddf8578",
      "new_mode": 33188,
      "new_path": "tests/integration/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "ce430569b813171ecf5ec9f4e911d910b9e83dd1",
      "old_mode": 33188,
      "old_path": "tests/integration/bzlmod_lockfile/MODULE.bazel.lock",
      "new_id": "f86bf246f1d1295b60a3d59f8a35f597ec188e49",
      "new_mode": 33188,
      "new_path": "tests/integration/bzlmod_lockfile/MODULE.bazel.lock"
    },
    {
      "type": "modify",
      "old_id": "fec4a8962fd336d975716fa3abcf3863734e5db1",
      "old_mode": 33188,
      "old_path": "tests/integration/integration_test.bzl",
      "new_id": "f8e8814a7ec32155e00fa8d3df5dcba5e5551c17",
      "new_mode": 33188,
      "new_path": "tests/integration/integration_test.bzl"
    },
    {
      "type": "modify",
      "old_id": "23e41f6cf126efad3cee83d55d7035ee0e772445",
      "old_mode": 33188,
      "old_path": "tests/integration/runner.py",
      "new_id": "fc85edfc91bc62a04a3b17ba9674422568d99479",
      "new_mode": 33188,
      "new_path": "tests/integration/runner.py"
    },
    {
      "type": "modify",
      "old_id": "de44afb7f3a7ca66b060d414cf62611ceb539fbd",
      "old_mode": 33188,
      "old_path": "tests/integration/uv_lock/MODULE.bazel",
      "new_id": "741b55bf86196ab6a4552cc6f08044ffbae36295",
      "new_mode": 33188,
      "new_path": "tests/integration/uv_lock/MODULE.bazel"
    },
    {
      "type": "modify",
      "old_id": "cce142852cc4fa844c4355ddacac400bc31cb1ef",
      "old_mode": 33188,
      "old_path": "tests/integration/uv_lock/README.md",
      "new_id": "e4e130ba6a2087396faa7f9df0291f3c0c791921",
      "new_mode": 33188,
      "new_path": "tests/integration/uv_lock/README.md"
    },
    {
      "type": "modify",
      "old_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "old_mode": 33188,
      "old_path": "tests/integration/uv_lock/WORKSPACE",
      "new_id": "abc8ce848380a62fcd0e8f3369dfc3e69f987e89",
      "new_mode": 33188,
      "new_path": "tests/integration/uv_lock/WORKSPACE"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "new_mode": 33188,
      "new_path": "tests/integration/uv_lock/WORKSPACE.bzlmod"
    },
    {
      "type": "modify",
      "old_id": "d2d18e69f75386b7862fd5bd3cdb3855edfc235c",
      "old_mode": 33188,
      "old_path": "tests/uv/lock/lock_run_test.py",
      "new_id": "5e077ae7096eda0346b05f048d1d5b6a639082fc",
      "new_mode": 33188,
      "new_path": "tests/uv/lock/lock_run_test.py"
    },
    {
      "type": "modify",
      "old_id": "4e38f3fdbbb05ba600fc8e5014e9e5f9babe7989",
      "old_mode": 33188,
      "old_path": "tests/uv/lock/uv_with_runfiles.py",
      "new_id": "1543db4f4215f0ebd246562b59d0d1f992a337cc",
      "new_mode": 33188,
      "new_path": "tests/uv/lock/uv_with_runfiles.py"
    },
    {
      "type": "modify",
      "old_id": "137b4e041fefd7fc94d97b5ab00a53161bdd9655",
      "old_mode": 33188,
      "old_path": "tests/uv/toolchain/BUILD.bazel",
      "new_id": "9017396ffe9800276c0034b46f68a5633aba2ddb",
      "new_mode": 33188,
      "new_path": "tests/uv/toolchain/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "d11bf065d8fa3f32fb400f019b583c503b462721",
      "old_mode": 33188,
      "old_path": "tests/uv/uv/uv_tests.bzl",
      "new_id": "e6250a4024ba2b034b2f0c371896be0be7801202",
      "new_mode": 33188,
      "new_path": "tests/uv/uv/uv_tests.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "aac709120f795eb967c80cbce19f99bbd2542226",
      "new_mode": 33188,
      "new_path": "tests/uv/uv_register_toolchains/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "9dca59b5c74bab4b7f6d071755c169c0522a53f1",
      "new_mode": 33188,
      "new_path": "tests/uv/uv_register_toolchains/uv_register_toolchains_tests.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "34096b22f6b4b45cb565e17d41022a4a1f08bfbe",
      "new_mode": 33188,
      "new_path": "tests/uv/uv_toolchains_manifest/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "00cbe9b2ef7ecd5ea42117f99cea6e49b7448266",
      "new_mode": 33188,
      "new_path": "tests/uv/uv_toolchains_manifest/uv_toolchains_manifest_tests.bzl"
    }
  ]
}
