)]}'
{
  "commit": "94c77e2fbe98e6a69599ddd58b4adf519c7d8316",
  "tree": "d37121e1c77d5b74f70851ea513cd5504a77c4e0",
  "parents": [
    "bda710c54731753b652041aa7c7d9967c012cef0"
  ],
  "author": {
    "name": "Richard Levasseur",
    "email": "rlevasseur@google.com",
    "time": "Fri Dec 13 08:33:34 2024 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Dec 13 16:33:34 2024 +0000"
  },
  "message": "fix: make bazel 9 workspace recognize rules_python as the main module (#2501)\n\nBuilding with Bazel 9 using WORKSPACE results in an odd error that\n`PyInfo`\nisn\u0027t defined. Oddly, the error refers to\n`rules_python/python/private/reexports.bzl`\nfor rules_python 0.28.0. This seems to only happen when the main module\nis rules_python.\n\nWhile Bazel 9 is supposed to drop workspace support, I\u0027ve been advised\nit\u0027s better to\nkeep testing WORKSPACE support until closer to when Bazel 9 fully\nremoves it.\n\nMy best guess about what\u0027s happening is Bazel\u0027s autoloading is\ntriggering and somehow\ndefining rules_python before it\u0027s recognized that the main module is\nrules_python.\nThe autoloading appears to be triggered, eventually, by things in\nbazel_tools loading\nrules_python.\n\nWhile removing unnecessary `@bazel_tools` loads in rules_python helps,\nthe particular\ncase I can\u0027t find a clean solution to is when\n`@@rules_java//toolchains:toolchain_java11_definition` causes\nrules_python to be\nloaded. This appears to end up loading rules_python via\n`@bazel_tools//tools/jdk:BUILD`, which has has some py rules defined in\nit.\n\nTo fix/work around this issue, `local_repository` can be used to define\nthe `rules_python`\nrepo before autoloading happens. This appears to take precedence over\nwhatever logic\nautoloading has.\n\nWork towards https://github.com/bazelbuild/rules_python/issues/2469",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6e9e85ac1e22576cff62b289bf5f745464a67089",
      "old_mode": 33188,
      "old_path": "WORKSPACE",
      "new_id": "7303b480f2be4bbf22956375e91dfb0bfed608e2",
      "new_mode": 33188,
      "new_path": "WORKSPACE"
    }
  ]
}
