)]}'
{
  "commit": "2a5ba18d60b25e10b99d0fa87b1da51f40d9f0d3",
  "tree": "c531eee82dd1c36f66a6f3186a1c92219df82675",
  "parents": [
    "636105772e5264ed2564b627ff4d09b40532f3c3"
  ],
  "author": {
    "name": "Alex Torok",
    "email": "alext9@gmail.com",
    "time": "Wed Aug 28 04:12:49 2024 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Aug 28 08:12:49 2024 +0000"
  },
  "message": "fix(gazelle): Correctly resolve deps that have top-level module overlap with a gazelle_python.yaml dep module (#2160)\n\nIn https://github.com/bazelbuild/rules_python/pull/2048,\n`FindThirdPartyDependency` was updated to walk up the module import path\nto try to find a match in gazelle_python.yaml. This is unnecessary, as\nthe main resolve loop will accomplish the same task.\n\nAdditionally, the change broke the ability to configure a more specific\nresolve override or resolve more specific indexed libraries.\n\nFor a real-world example of where this is a problem, `pytype` has a\n`third_party` module at its top-level. In a repo that also has a\n`third_party` directory, we can no longer resolve our indexed libraries\nin `third_party`. When the resolve loop tried to resolve\n`third_party.foo.bar`, `FindThirdPartyDependency` will immediately match\n`third_party` and not give the resolve loop a chance to look in the rule\nindex for `third_party.foo.bar`.\n\nThe same issue appears for providing overrides that are more specific\n(see the updated testcase).\n\nThis PR reverts the change to FindThirdPartyDependency and updates the\ntestcases to ensure that we can still resolve specific indexed packages,\nexplicit resolve overrides, and third party modules even when there is\nan overlap in the top-level module name.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "59dfbe481ba9a151f56f2b41add6ab9552eec1bd",
      "old_mode": 33188,
      "old_path": "CHANGELOG.md",
      "new_id": "387b55b0c9a53863df5697007f4fb6d12dd732a2",
      "new_mode": 33188,
      "new_path": "CHANGELOG.md"
    },
    {
      "type": "modify",
      "old_id": "71a5c5addac95395cc5e003727d86dec93a8ca05",
      "old_mode": 33188,
      "old_path": "gazelle/python/testdata/dependency_resolution_order/BUILD.in",
      "new_id": "aaf45f4045edff50823c1c9ea22f7f3313d9c617",
      "new_mode": 33188,
      "new_path": "gazelle/python/testdata/dependency_resolution_order/BUILD.in"
    },
    {
      "type": "modify",
      "old_id": "eebe6c3524617fc1facbbe16cbcb1bab7542e97c",
      "old_mode": 33188,
      "old_path": "gazelle/python/testdata/dependency_resolution_order/BUILD.out",
      "new_id": "58fd266999d32316a7088fd89364407f5849e029",
      "new_mode": 33188,
      "new_path": "gazelle/python/testdata/dependency_resolution_order/BUILD.out"
    },
    {
      "type": "modify",
      "old_id": "d9c6504deba631dcb5c6994548e67854a07ebfb8",
      "old_mode": 33188,
      "old_path": "gazelle/python/testdata/dependency_resolution_order/__init__.py",
      "new_id": "e2d0a8a9790065daf8b4856cfa0034ffa7ed2a6c",
      "new_mode": 33188,
      "new_path": "gazelle/python/testdata/dependency_resolution_order/__init__.py"
    },
    {
      "type": "modify",
      "old_id": "8615181c91f278063f7563dce07da33123197c51",
      "old_mode": 33188,
      "old_path": "gazelle/python/testdata/dependency_resolution_order/gazelle_python.yaml",
      "new_id": "e62ad33479eb3352b022c360953ede628f36f2a3",
      "new_mode": 33188,
      "new_path": "gazelle/python/testdata/dependency_resolution_order/gazelle_python.yaml"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "new_mode": 33188,
      "new_path": "gazelle/python/testdata/dependency_resolution_order/third_party/BUILD.in"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2c130d7b0e819836fe5905be3e4d8f647fb11e99",
      "new_mode": 33188,
      "new_path": "gazelle/python/testdata/dependency_resolution_order/third_party/BUILD.out"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e01d49c11842a57a945a1a6f69910400c53f12cf",
      "new_mode": 33188,
      "new_path": "gazelle/python/testdata/dependency_resolution_order/third_party/baz.py"
    },
    {
      "type": "modify",
      "old_id": "166b5750461d16ba28376153b4be57cbc9bd835a",
      "old_mode": 33188,
      "old_path": "gazelle/pythonconfig/pythonconfig.go",
      "new_id": "a24a90efeb8faddcbac6a6867a583e79392fe848",
      "new_mode": 33188,
      "new_path": "gazelle/pythonconfig/pythonconfig.go"
    }
  ]
}
