)]}'
{
  "commit": "81c67981cbe488e01d25b1ae6306731167cfb2b7",
  "tree": "585973c68555a0937083767b06beff3f8e54be77",
  "parents": [
    "428c1bbb2c81feacf5e61f44201484c7e3378434"
  ],
  "author": {
    "name": "Richard Levasseur",
    "email": "rlevasseur@google.com",
    "time": "Tue Feb 04 09:14:00 2025 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Feb 04 17:14:00 2025 +0000"
  },
  "message": "refactor: expose base rule construction via builders to allow customization for testing (#2600)\n\nThe py_reconfig rules work by wrapping: The outer reconfig rule applies\na transition, depends\non an inner py base rule, then jumps through various hoops to ensure it\nlooks and acts\nlike the target it\u0027s wrapping.\n\nThis is error prone, incomplete, and annoying code to maintain. Phil\nrecently discovered it wasn\u0027t properly propagating the output group, so\nhe had to add that. I wasted time trying to fix a bug I _thought_ was in\nit, but actually was working correctly. The logic within it is a bit\nhacky as it tries to emulate some of the platform-specific stuff for\nwindows. Every time\npy_reconfig gains something to transition on, there\u0027s numerous places to\ndefine, propagate,\nand extract the pieces necessary to do it.\n\nTo fix this, make the py_reconfig rules not wrap an inner base py rule.\nInstead, they use the same underlying rule args that the base rules do.\nThis lets them act directly as the rule they\u0027re designed to test.\n\nCustomization is done by capturing all the rule args in builder objects.\nThe py_reconfig code constructs the same builder the base rules do, then\nmodifies it as necessary (adding attributes, wrapping the base\ntransition function). As a bonus, this sets some ground work to allow\nmore easily defining derivative rules without having to copy/paste\narbitrary parts of how the base rules are defined.\n\nWork towards https://github.com/bazelbuild/rules_python/issues/1647",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "50aa3ed91aff1126ec7fdded5db0a110a5d269e2",
      "old_mode": 33188,
      "old_path": "python/private/builders.bzl",
      "new_id": "bf5dbb8667e735e246982a82bd3cdcc747394b7f",
      "new_mode": 33188,
      "new_path": "python/private/builders.bzl"
    },
    {
      "type": "modify",
      "old_id": "d1269f23217693ab22ce3168e4833a5b61b26f44",
      "old_mode": 33188,
      "old_path": "python/private/py_binary_macro.bzl",
      "new_id": "fa10f2e8a34098455be6cee0cfa69d3666f04502",
      "new_mode": 33188,
      "new_path": "python/private/py_binary_macro.bzl"
    },
    {
      "type": "modify",
      "old_id": "f1c8eb13258b80c2208087b62f94d9d3c4e1b339",
      "old_mode": 33188,
      "old_path": "python/private/py_binary_rule.bzl",
      "new_id": "5b40f52198be35a40e4b3a535182d3b821883c9e",
      "new_mode": 33188,
      "new_path": "python/private/py_binary_rule.bzl"
    },
    {
      "type": "modify",
      "old_id": "18a7a707fc33d2caffe81d42e52cf0dbb018383e",
      "old_mode": 33188,
      "old_path": "python/private/py_executable.bzl",
      "new_id": "2b2bf6636adcfd84e8f1000e352152ed55551d22",
      "new_mode": 33188,
      "new_path": "python/private/py_executable.bzl"
    },
    {
      "type": "modify",
      "old_id": "348e8772257594747ae1c2ec6bf50651fc7b4065",
      "old_mode": 33188,
      "old_path": "python/private/py_test_macro.bzl",
      "new_id": "028dee6678b7668c5f0666464dacd5da9b7f6e0f",
      "new_mode": 33188,
      "new_path": "python/private/py_test_macro.bzl"
    },
    {
      "type": "modify",
      "old_id": "63000c7255bc50e31fd6b10329ee8e8d28cdbd20",
      "old_mode": 33188,
      "old_path": "python/private/py_test_rule.bzl",
      "new_id": "6ad4fbddb815917b7edd01ae8a9888fc3a13a49a",
      "new_mode": 33188,
      "new_path": "python/private/py_test_rule.bzl"
    },
    {
      "type": "modify",
      "old_id": "4fa53ebd66efa791bad3a1bd033f761e490a133a",
      "old_mode": 33188,
      "old_path": "tests/support/sh_py_run_test.bzl",
      "new_id": "a1da2858647df1def7c442d130f53c5a5be91ffc",
      "new_mode": 33188,
      "new_path": "tests/support/sh_py_run_test.bzl"
    },
    {
      "type": "modify",
      "old_id": "371b252a4a886453ca8036542997d6d78d528bbe",
      "old_mode": 33188,
      "old_path": "tests/toolchains/python_toolchain_test.py",
      "new_id": "591d7dbe8a56e74269ddaf33f8169910b81a601b",
      "new_mode": 33188,
      "new_path": "tests/toolchains/python_toolchain_test.py"
    }
  ]
}
