)]}'
{
  "commit": "2abca35cf67f60d41485eaab1f53ff7a3c6e9b50",
  "tree": "5c6b9d1d03d261349119cb166f4312b8f31e6b09",
  "parents": [
    "5913816ce6b9aa9d318e4cba7984bbc983701d9b"
  ],
  "author": {
    "name": "Ignas Anikevicius",
    "email": "240938+aignas@users.noreply.github.com",
    "time": "Fri Nov 22 13:19:26 2024 +0900"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Nov 22 04:19:26 2024 +0000"
  },
  "message": "refactor(pypi): move config setting processing to the macro (#2424)\n\nBefore hand we would pass around `whl_alias` struct instances and it\nwould go through rounds of starlark functions which would end up\nrendered as BUILD.bazel files in the hub repository. This means that\nevery time the output of the said functions would change, the\n`MODULE.bazel.lock` would also possibly change.\n\nSince we now have much better unit testing framework, we start relying\non these functions being evaluated at loading phase instead of repo rule\nphase, which means that we can make the `BUILD.bazel` files not change a\nlot when the underlying code changes, this should make the code more\nmaintainable in the long run and unblocks the code to accept extra\nthings, like env marker values or similar.\n\nSummary:\n- Remove the `repo` field from `whl_alias`.\n- Rename `whl_alias` to `whl_config_setting`\n- Move the tests around\n- Simplify the `pkg_aliases` tests to use `contains` instead of exact\n  equality to make things less brittle.\n- Simplify the `pkg_aliases` tests to use different mocks to make\n  expectations easier to understand.\n- Make `whl_config_setting` hashable by using tuples instead of lists.\n- Adjust how we store the `whl_config_setting` in the PyPI extension\n  and optimize the passing to the `hub_repository`.\n\nThis is needed for #2319 and #2423.\n\nTo be in future PRs:\n* Remove the need to pass `osx_versions`, etc to the `pkg_aliases`\nmacro.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "dafbcfb757ec0b72c6a201a3949de300dea7e125",
      "old_mode": 33188,
      "old_path": "python/private/pypi/BUILD.bazel",
      "new_id": "2cc073a8328c015ccbd16d7a1967eaec36169c87",
      "new_mode": 33188,
      "new_path": "python/private/pypi/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "2ed946fbcab75e45f85aacb333c8f756d407fa6b",
      "old_mode": 33188,
      "old_path": "python/private/pypi/extension.bzl",
      "new_id": "fd224d1592fbaf3312e72aa005be526a78207bf7",
      "new_mode": 33188,
      "new_path": "python/private/pypi/extension.bzl"
    },
    {
      "type": "modify",
      "old_id": "69d937142a904c76bf15dbe480abfa3c77318022",
      "old_mode": 33188,
      "old_path": "python/private/pypi/hub_repository.bzl",
      "new_id": "48245b41068f5ea398610789b1d2b017dbcf6019",
      "new_mode": 33188,
      "new_path": "python/private/pypi/hub_repository.bzl"
    },
    {
      "type": "modify",
      "old_id": "597b37f52ceb17e4c5ed1f0c4979a29c954e5139",
      "old_mode": 33188,
      "old_path": "python/private/pypi/pip_repository.bzl",
      "new_id": "47fa31f1bcc9b530866f23a0cfcc423181def0c0",
      "new_mode": 33188,
      "new_path": "python/private/pypi/pip_repository.bzl"
    },
    {
      "type": "modify",
      "old_id": "de9545e986855f8b2f76b2939d915d33268fe8fc",
      "old_mode": 33188,
      "old_path": "python/private/pypi/pkg_aliases.bzl",
      "new_id": "284f8e9ed0f8e28df72b8281f4bfd32281d9a424",
      "new_mode": 33188,
      "new_path": "python/private/pypi/pkg_aliases.bzl"
    },
    {
      "type": "modify",
      "old_id": "98c9d0906fb2c056c3a5c56b27e9433e025899c6",
      "old_mode": 33188,
      "old_path": "python/private/pypi/render_pkg_aliases.bzl",
      "new_id": "66968c11e2c03327c1f3aae6fee18f7c68bb9f10",
      "new_mode": 33188,
      "new_path": "python/private/pypi/render_pkg_aliases.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e46c7d37d739c5ba9fca3ea8c005d409aadc5ceb",
      "new_mode": 33188,
      "new_path": "python/private/pypi/whl_config_setting.bzl"
    },
    {
      "type": "modify",
      "old_id": "38f2b0e4044a539454e6940540244397660ffa90",
      "old_mode": 33188,
      "old_path": "python/private/text_util.bzl",
      "new_id": "a64b5d6243b46078a53cc0d6f3f8c33d63b32dff",
      "new_mode": 33188,
      "new_path": "python/private/text_util.bzl"
    },
    {
      "type": "modify",
      "old_id": "39670cd71f953f75e4f9754f427b4429a09b0362",
      "old_mode": 33188,
      "old_path": "tests/pypi/extension/extension_tests.bzl",
      "new_id": "7dfd8762a7f1b8059f8cb7a2ec5ca67ab3d495e2",
      "new_mode": 33188,
      "new_path": "tests/pypi/extension/extension_tests.bzl"
    },
    {
      "type": "modify",
      "old_id": "cf801ae6431b41c7d7c07ea47dd4ef471f580308",
      "old_mode": 33188,
      "old_path": "tests/pypi/pkg_aliases/pkg_aliases_test.bzl",
      "new_id": "0fa66d05eb1c40f0d92f642e80cbaba0c7be2291",
      "new_mode": 33188,
      "new_path": "tests/pypi/pkg_aliases/pkg_aliases_test.bzl"
    },
    {
      "type": "modify",
      "old_id": "4741df04b4a6b1e88a7b1f6ecc33ab314b5d45ff",
      "old_mode": 33188,
      "old_path": "tests/pypi/render_pkg_aliases/render_pkg_aliases_test.bzl",
      "new_id": "0ba642eca9c40fb4697f003937778a357f9d6b81",
      "new_mode": 33188,
      "new_path": "tests/pypi/render_pkg_aliases/render_pkg_aliases_test.bzl"
    }
  ]
}
