)]}'
{
  "commit": "d85a3925c5d32783b4ebbd652ce7acda109fa27f",
  "tree": "a8fbb02a94056da4b228e7afe0fe39f1caaf9a20",
  "parents": [
    "30fc3f99b5fa50e0dc99ef0465c0b1ae89fb9212"
  ],
  "author": {
    "name": "Richard Levasseur",
    "email": "rlevasseur@google.com",
    "time": "Mon Oct 07 15:03:17 2024 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Oct 07 22:03:17 2024 +0000"
  },
  "message": "feat: add public API for analysis-phase logic (#2252)\n\nThis adds a public API for rules (i.e. analysis-phase code) to use code\nfrom rules_python.\nThe main motivation for this is so that users can propagate PyInfo\nwithout having to know\nall the fields of PyInfo and implement the merging logic. With upcoming\nPRs adding additional\nfields to PyInfo, this becomes much more important.\n\nThe way the API is exposed is through a target. There are three reasons\nfor this:\n1. It avoids loading phase costs when the implementation of the API\nfunctions change.\nWithin Google, this makes changes to rules_python much cheaper and\neasier to submit\nand revert. This also allows us to worry less about the loading-phase\nimpact of\n   our code.\n2. Because a target can have dependencies, it allows us to hide some\ndetails\nfrom users. For example, if we want a flag to affect behavior, we can\nadd it to the\nAPI target\u0027s attributes; users don\u0027t have to add it to their rule\u0027s\nattributes\n3. By having the API take the user\u0027s `ctx` as an argument, it allows us\nto capture it\nand use it as part of future API calls (this isn\u0027t used now, but gives\nus\n   flexibility in the future).\n\nWork towards https://github.com/bazelbuild/rules_python/issues/1647",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3077756655f84ef897fdf648994122ec1380c592",
      "old_mode": 33188,
      "old_path": "CHANGELOG.md",
      "new_id": "d58351a542a24a47b27d6eff3fdecb80f6658be6",
      "new_mode": 33188,
      "new_path": "CHANGELOG.md"
    },
    {
      "type": "modify",
      "old_id": "149e2c57f3bfe4d6ffb1a7abfd8b954736831361",
      "old_mode": 33188,
      "old_path": "docs/BUILD.bazel",
      "new_id": "66b6496fc586b6a1f70e29354f37e7b3c3034e2b",
      "new_mode": 33188,
      "new_path": "docs/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "53fb812af6c0b4f93e8a82cacc00a097ecce565e",
      "old_mode": 33188,
      "old_path": "python/BUILD.bazel",
      "new_id": "e64ad8cdb7cdb4a85061b00935ef0a992300d165",
      "new_mode": 33188,
      "new_path": "python/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1df6877ef874a0f629e6954ceeffed9e2e53c6d1",
      "new_mode": 33188,
      "new_path": "python/api/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c8fb921c12886cacc7e58f1df73b1a563ecc553c",
      "new_mode": 33188,
      "new_path": "python/api/api.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "9e97dc2b59f8a13c0aa038efe857bb466c7826e6",
      "new_mode": 33188,
      "new_path": "python/private/api/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "06fb7294b942a75e0adaf0b10657c577bac156a2",
      "new_mode": 33188,
      "new_path": "python/private/api/api.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "401b35973e27494578c668137d695e3ab83f367c",
      "new_mode": 33188,
      "new_path": "python/private/api/py_common_api.bzl"
    },
    {
      "type": "modify",
      "old_id": "a3e40f2924308f1d0c6fbba2709654e279b1ff36",
      "old_mode": 33188,
      "old_path": "python/private/py_info.bzl",
      "new_id": "97cd50bdcf54dba2196ffb6744cc263b0772f3fe",
      "new_mode": 33188,
      "new_path": "python/private/py_info.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "09300370d3b9b151f6066afb0a371cb722363fd7",
      "new_mode": 33188,
      "new_path": "tests/api/py_common/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "572028b2a6cb526b8c238c727299551f29517756",
      "new_mode": 33188,
      "new_path": "tests/api/py_common/py_common_tests.bzl"
    },
    {
      "type": "modify",
      "old_id": "b64263f6ba14b051b7d231d0bae8fdc46ad5024d",
      "old_mode": 33188,
      "old_path": "tests/base_rules/py_info/py_info_tests.bzl",
      "new_id": "97c8e2608d4079c0fb481c74c7c6931b0cd87dea",
      "new_mode": 33188,
      "new_path": "tests/base_rules/py_info/py_info_tests.bzl"
    }
  ]
}
