)]}'
{
  "commit": "488a0372a4242140cb2e4bfa28e4a8e652866670",
  "tree": "604b3d450054e0883c8912cdf1e511326d1ae624",
  "parents": [
    "3fe06a18ff084613ce0fb70b58437f00fcb760a3"
  ],
  "author": {
    "name": "Ignas Anikevicius",
    "email": "ignas.anikevicius@woven-planet.global",
    "time": "Tue Jan 31 10:20:24 2023 +0900"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Jan 30 17:20:24 2023 -0800"
  },
  "message": "feat(coverage): Register coverage.py to hermetic toolchains (#977)\n\nThis allows including the coverage package as part of the toolchain dependencies, which is mixed into a test\u0027s dependencies when `bazel coverage` is run (if coverage is not enabled, no extra dependency is added)\r\n\r\nFor now, it\u0027s disabled by default because enabling it poses the risk of having two versions of coverage installed (one from the toolchain, one from the user\u0027s dependencies).\r\n\r\nThe user can turn the coverage_tool setting by passing\r\n`register_coverage_tool\u003d(True|False)` to `python_register_toolchains` or\r\n`python_register_multi_toolchains` call or specifying the\r\n`coverage_tool` label as described in the `versions.bzl` file.\r\n\r\nUse coverage.py v6.5.0 because the latest has `types.py` in the package\r\ndirectory, which imports from Python\u0027s stdlib `types` [1]. Somehow the\r\nPython interpreter is thinking that the `from types import FrameType` is\r\nreferring to the currently interpreted file and everything breaks. I\r\nwould have expected the package to use absolute imports and only attempt\r\nto import from `coverage.types` if we use `coverage.types` and not just\r\na plain `types` import.\r\n\r\nNOTE: Coverage is only for non-windows platforms.\r\n\r\nUpdate tests to:\r\n- ensure that we can still use the toolchain as previously.\r\n- ensure that we are not downloading extra deps if they are not needed.\r\n\r\n* Also changes the projects bazelrc to use a remotejdk, which makes it easier for contributors because they don\u0027t have to locally install a jdk to get going.\r\n\r\n[1]: https://github.com/nedbat/coveragepy/blob/master/coverage/types.py\r\n[3]: https://github.com/bazelbuild/bazel/issues/15835",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "95fdea6985ed04a66ea3055e250b694930830ebf",
      "old_mode": 33188,
      "old_path": ".bazelci/presubmit.yml",
      "new_id": "a4003604d0664372df045fdda1e428a477d77478",
      "new_mode": 33188,
      "new_path": ".bazelci/presubmit.yml"
    },
    {
      "type": "modify",
      "old_id": "af5d2e079fa0b768b353b6211d3774479e07f24e",
      "old_mode": 33188,
      "old_path": "MODULE.bazel",
      "new_id": "92da4020b9e324274d3af4c53ff69cdc6277f9ea",
      "new_mode": 33188,
      "new_path": "MODULE.bazel"
    },
    {
      "type": "modify",
      "old_id": "b3a24e86053229b12f8d0edfa44525eaac55bddc",
      "old_mode": 33188,
      "old_path": "examples/bzlmod/.bazelrc",
      "new_id": "b8c233f98c3e5b89a70556b4c482b1ed6817dd73",
      "new_mode": 33188,
      "new_path": "examples/bzlmod/.bazelrc"
    },
    {
      "type": "modify",
      "old_id": "209456736280d226f2556b94bf4f95258658575b",
      "old_mode": 33188,
      "old_path": "examples/bzlmod/BUILD.bazel",
      "new_id": "7b7566bd5a4c7cd8d3cb519ad26832cfa9db8e9a",
      "new_mode": 33188,
      "new_path": "examples/bzlmod/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "48fb4cb3fcbfbca86c4f10d60d364d7ee95dce00",
      "old_mode": 33188,
      "old_path": "examples/bzlmod/MODULE.bazel",
      "new_id": "5f984c39dfc761028c80cef3b22f3b6ead48ca23",
      "new_mode": 33188,
      "new_path": "examples/bzlmod/MODULE.bazel"
    },
    {
      "type": "modify",
      "old_id": "b173bd6f573e0ab9d6957e3a8fe484f6368388c5",
      "old_mode": 33188,
      "old_path": "examples/bzlmod/__main__.py",
      "new_id": "099493b3c8a49e134e1d57e0badded8bfc68f471",
      "new_mode": 33188,
      "new_path": "examples/bzlmod/__main__.py"
    },
    {
      "type": "rename",
      "old_id": "646c6e890f8e67b4496c1aa200acf2fe5fe400ef",
      "old_mode": 33188,
      "old_path": "examples/bzlmod/__init__.py",
      "new_id": "646c6e890f8e67b4496c1aa200acf2fe5fe400ef",
      "new_mode": 33188,
      "new_path": "examples/bzlmod/lib.py",
      "score": 100
    },
    {
      "type": "modify",
      "old_id": "b6038a7d1bbdfc3df11aa9b7ce93f4817c15b15f",
      "old_mode": 33188,
      "old_path": "examples/bzlmod/test.py",
      "new_id": "cdc1c89680b1bb7bd8138368299c7bc8db70f266",
      "new_mode": 33188,
      "new_path": "examples/bzlmod/test.py"
    },
    {
      "type": "modify",
      "old_id": "f23315a7a10d6ed52992021623ea67999fd87c76",
      "old_mode": 33188,
      "old_path": "examples/multi_python_versions/.bazelrc",
      "new_id": "3fd6365ba95e66964c6ae5b90401973a65bc5a68",
      "new_mode": 33188,
      "new_path": "examples/multi_python_versions/.bazelrc"
    },
    {
      "type": "modify",
      "old_id": "41c8880221d17b8fcc975af766213fe6928d126a",
      "old_mode": 33188,
      "old_path": "examples/multi_python_versions/WORKSPACE",
      "new_id": "35855ca1e153c46b370ce3d863dd7910884ba076",
      "new_mode": 33188,
      "new_path": "examples/multi_python_versions/WORKSPACE"
    },
    {
      "type": "modify",
      "old_id": "4848fabe10619a883769fe4fb5485ea7c8a98b32",
      "old_mode": 33188,
      "old_path": "examples/multi_python_versions/requirements/BUILD.bazel",
      "new_id": "e3184c8ac5b275b0e01e65eba020e89347778c84",
      "new_mode": 33188,
      "new_path": "examples/multi_python_versions/requirements/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a437a397d0d96819622e8e9f7ccd46f0f60936f0",
      "new_mode": 33188,
      "new_path": "examples/multi_python_versions/requirements/requirements_lock_3_11.txt"
    },
    {
      "type": "modify",
      "old_id": "7219ca5c2787263ce5abc8fb8d7de8859f40c094",
      "old_mode": 33188,
      "old_path": "examples/multi_python_versions/tests/BUILD.bazel",
      "new_id": "2292d53e402d028299e4f2b593f30f4ca0c19f2c",
      "new_mode": 33188,
      "new_path": "examples/multi_python_versions/tests/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "0c9ad07c1adeea6550b4c7bbd688a4a259aa0f05",
      "old_mode": 33188,
      "old_path": "python/extensions.bzl",
      "new_id": "bc0d570c5267529d446a6cbdd6b537fe96032f3b",
      "new_mode": 33188,
      "new_path": "python/extensions.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d6092e675b4e3c4f0041586ebb54e72181d570fd",
      "new_mode": 33188,
      "new_path": "python/private/coverage_deps.bzl"
    },
    {
      "type": "modify",
      "old_id": "7589640332ab88e7556b04c4813d5688c155f070",
      "old_mode": 33188,
      "old_path": "python/repositories.bzl",
      "new_id": "faaec64d952da0b2d10fb6b30a3c3724c83499a5",
      "new_mode": 33188,
      "new_path": "python/repositories.bzl"
    },
    {
      "type": "modify",
      "old_id": "f843e47619dc6756a3a1eaaa2e07d4bbe1bd8477",
      "old_mode": 33188,
      "old_path": "python/versions.bzl",
      "new_id": "4feeeae58c7ae91ec91d6e72fabd82cee4270ad9",
      "new_mode": 33188,
      "new_path": "python/versions.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4cf1e942322968715bcd441fb4a81f2fc8a7596c",
      "new_mode": 33261,
      "new_path": "tools/update_coverage_deps.py"
    }
  ]
}
