)]}'
{
  "commit": "68c30483f80a55870eb113e17ab21ff65d5b97ed",
  "tree": "0c6f11a3e3b67f63778053aee796bba772d2fa01",
  "parents": [
    "68f752e3fb141f520978ad86f3f0e155c3502a20"
  ],
  "author": {
    "name": "Richard Levasseur",
    "email": "rlevasseur@google.com",
    "time": "Tue Jul 16 16:22:22 2024 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Jul 16 23:22:22 2024 +0000"
  },
  "message": "internal: repos to create a toolchain from a locally installed Python (#2000)\n\nThis adds the primitives for defining a toolchain based on a locally\ninstalled Python.\nDoing this consists of two parts:\n\n* A repo rule to define a Python runtime pointing to a local Python\ninstallation.\n* A repo rule to define toolchains for those runtimes.\n\nThe runtime repos create platform runtimes, i.e, it sets\npy_runtime.interpreter_path.\nThis means the runtime isn\u0027t included in the runfiles.\n\nNote that these repo rules are largely implementation details, and are\ndefinitely not\nstable API-wise. Creating public APIs to use them through WORKSPACE or\nbzlmod will\nbe done in a separate change (there\u0027s a few design and behavior\nquestions to discuss).\n\nThis is definitely experimental quality. In particular, the code that\ntries\nto figure out the C headers/libraries is very finicky. I couldn\u0027t find\nsolid docs about\nhow to do this, and there\u0027s a lot of undocumented settings, so what\u0027s\nthere is what\nI was able to piece together from my laptop\u0027s behavior.\n\nMisc other changes:\n* Also fixes a bug if a pyenv-backed interpreter path is used for\nprecompiling:\npyenv uses `$0` to determine what to re-exec. The\n`:current_interpreter_executable`\n  target used its own name, which pyenv didn\u0027t understand.\n* The repo logger now also accepts a string. This should help prevent\naccidentally\npassing a string causing an error. It\u0027s also just a bit more convenient\nwhen\n  doing development.\n* Repo loggers will automatically include their rule name and repo name.\nThis\n  makes following logging output easier.\n* Makes `repo_utils.execute()` report progress.\n* Adds `repo_utils.getenv`, `repo_utils.watch`, and\n`repo_utils.watch_tree`:\n  backwards compatibility functions for their `rctx` equivalents.\n* Adds `repo_utils.which_unchecked`: calls `which`, but allows for\nfailure.\n* Adds `repo_utils.get_platforms_os_name()`: Returns the name used in\n`@platforms` for\n  the OS reported by `rctx`.\n* Makes several repo util functions call `watch()` or `getenv()`, if\navailable. This\n  makes repository rules better respect environmental changes.\n* Adds more detail to the definition of an in-build vs platform runtime\n* Adds a README for the integration tests directory. Setting up and\nusing one is a bit\n  more involved than other tests, so some docs help.\n* Allows integration tests to specify bazel versions to use.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bf13baf13238262335eea438abc1d894fd3cb995",
      "old_mode": 33188,
      "old_path": ".bazelrc",
      "new_id": "0833d8d979d69f78470e8295e713aa3e165ab0fc",
      "new_mode": 33188,
      "new_path": ".bazelrc"
    },
    {
      "type": "modify",
      "old_id": "f54034db2d90aa86273b3a2a9695eb433f6222bc",
      "old_mode": 33188,
      "old_path": "docs/sphinx/glossary.md",
      "new_id": "9afbcffb92ec21da1e06068a05a36ca7956c1565",
      "new_mode": 33188,
      "new_path": "docs/sphinx/glossary.md"
    },
    {
      "type": "modify",
      "old_id": "68c969416e446f4b98e5e3e2e350d9c8c296a11a",
      "old_mode": 33188,
      "old_path": "python/private/full_version.bzl",
      "new_id": "98eeee59a1996d7458057bd5f58f950f922729d9",
      "new_mode": 33188,
      "new_path": "python/private/full_version.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "0207f56beff31447b2043876ae564192e0187ca6",
      "new_mode": 33188,
      "new_path": "python/private/get_local_runtime_info.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f6bca6cc2cbda2f1cb84e8e2aee03c0f8962c0b3",
      "new_mode": 33188,
      "new_path": "python/private/local_runtime_repo.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "23fa99dfa956013e9a894b67e3d7735c61c390c5",
      "new_mode": 33188,
      "new_path": "python/private/local_runtime_repo_setup.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "880fbfe2248d84cf669fbf37f82d59164ccdf215",
      "new_mode": 33188,
      "new_path": "python/private/local_runtime_toolchains_repo.bzl"
    },
    {
      "type": "modify",
      "old_id": "b3d0fb263420f7cd5c809df688698a272f9cfe1d",
      "old_mode": 33188,
      "old_path": "python/private/py_exec_tools_toolchain.bzl",
      "new_id": "a4516d86eb2c1ebd42aef85051166457d54b1f22",
      "new_mode": 33188,
      "new_path": "python/private/py_exec_tools_toolchain.bzl"
    },
    {
      "type": "modify",
      "old_id": "564e0ee45dbc42d56596271844305e26edb28863",
      "old_mode": 33188,
      "old_path": "python/private/py_toolchain_suite.bzl",
      "new_id": "3fead95069cdcdf511a43e6e047f91164c2cc5fd",
      "new_mode": 33188,
      "new_path": "python/private/py_toolchain_suite.bzl"
    },
    {
      "type": "modify",
      "old_id": "54ad45c2f1cacd822146c6e2d094184fb6904b12",
      "old_mode": 33188,
      "old_path": "python/private/repo_utils.bzl",
      "new_id": "9d76e19833c41c318bf218f3e3019e926e2bcf79",
      "new_mode": 33188,
      "new_path": "python/private/repo_utils.bzl"
    },
    {
      "type": "modify",
      "old_id": "8a018e796963defdeaca1934fafc1865077bacec",
      "old_mode": 33188,
      "old_path": "python/private/text_util.bzl",
      "new_id": "38f2b0e4044a539454e6940540244397660ffa90",
      "new_mode": 33188,
      "new_path": "python/private/text_util.bzl"
    },
    {
      "type": "modify",
      "old_id": "ac475da534daea550c1be14a38381f2ffb1a7f83",
      "old_mode": 33188,
      "old_path": "tests/integration/BUILD.bazel",
      "new_id": "8724b252806bba5ad63dda810e5bab2a88f474b5",
      "new_mode": 33188,
      "new_path": "tests/integration/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e36e363224db8f9783ee90f199a6768fe0873152",
      "new_mode": 33188,
      "new_path": "tests/integration/README.md"
    },
    {
      "type": "modify",
      "old_id": "7a8070aa1ce516959c6c272d3fc134e6c3cc297e",
      "old_mode": 33188,
      "old_path": "tests/integration/integration_test.bzl",
      "new_id": "8606f66bb3ee34df27e73073ca21662c5a710bc0",
      "new_mode": 33188,
      "new_path": "tests/integration/integration_test.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "551df401b341c919848402e936b1b6fbb9dc3b4c",
      "new_mode": 33188,
      "new_path": "tests/integration/local_toolchains/.bazelrc"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "6fbf5489010e6f4f14da35b8c2f88be55061cb58",
      "new_mode": 33188,
      "new_path": "tests/integration/local_toolchains/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d4ef12e9528569ebeb5158af9415dcfaa66951fb",
      "new_mode": 33188,
      "new_path": "tests/integration/local_toolchains/MODULE.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "new_mode": 33188,
      "new_path": "tests/integration/local_toolchains/REPO.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "new_mode": 33188,
      "new_path": "tests/integration/local_toolchains/WORKSPACE"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "new_mode": 33188,
      "new_path": "tests/integration/local_toolchains/WORKSPACE.bzlmod"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "63771cf78d8edea11ef3c27547991657fa98312b",
      "new_mode": 33188,
      "new_path": "tests/integration/local_toolchains/test.py"
    }
  ]
}
