)]}'
{
  "commit": "3d68f6cc6b6c906cf5947b384cfba350810cf1fb",
  "tree": "39cbeee0cfb0f5dd914a2f4194e609154bc920fd",
  "parents": [
    "231d3f633fbcbb36028d96a188298df99bf153e1"
  ],
  "author": {
    "name": "Nikolaus Wittenstein",
    "email": "nikolaus.wittenstein@gmail.com",
    "time": "Mon Jan 08 16:09:06 2024 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Jan 09 00:09:06 2024 +0000"
  },
  "message": "fix: Fix per-file config interaction with one py_binary per main (#1664)\n\n[This previous PR](https://github.com/bazelbuild/rules_python/pull/1584)\nadded the ability to make a `py_binary` target per file if `if __name__\n\u003d\u003d \"__main__\"` tokens were found in the file. This works great in the\ndefault case, but when `python_generation_mode` is set to `file`, the\nplugin now attempts to make both a `py_binary` and a `py_library` target\nfor each main file, which results in an error.\n\nThis PR modifies the behavior to work properly with per-file target\ngeneration, and adds tests for this case.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "af61b44cced5cf35edcd3db69492390b055977cc",
      "old_mode": 33188,
      "old_path": "CHANGELOG.md",
      "new_id": "8bd56f18c1746fa716c7a03d2bc20e1141230cf7",
      "new_mode": 33188,
      "new_path": "CHANGELOG.md"
    },
    {
      "type": "modify",
      "old_id": "a9a69ccf22c977edc02d76961af3ed06ecc4c066",
      "old_mode": 33188,
      "old_path": "gazelle/README.md",
      "new_id": "2e2337ab5dbb495f48f63e288972b67ef3a68891",
      "new_mode": 33188,
      "new_path": "gazelle/README.md"
    },
    {
      "type": "modify",
      "old_id": "95f5396f786e4d0e3ff9c234c45e7a60a1800488",
      "old_mode": 33188,
      "old_path": "gazelle/python/generate.go",
      "new_id": "ba273be2b78e3507c36061d3971555825927a4e2",
      "new_mode": 33188,
      "new_path": "gazelle/python/generate.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b24a82339d185b9d6a48b6d6d78f184a041499ae",
      "new_mode": 33188,
      "new_path": "gazelle/python/testdata/binary_without_entrypoint_per_file_generation/BUILD.in"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "bffedb1e27b25a11add11d3b06e338e92d685cb9",
      "new_mode": 33188,
      "new_path": "gazelle/python/testdata/binary_without_entrypoint_per_file_generation/BUILD.out"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "9cbe3e9e72f3fd4f1879d069b931efda10bf6e12",
      "new_mode": 33188,
      "new_path": "gazelle/python/testdata/binary_without_entrypoint_per_file_generation/README.md"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "faff6af87ac0ef60c3f9dacae80ca00b08118b58",
      "new_mode": 33188,
      "new_path": "gazelle/python/testdata/binary_without_entrypoint_per_file_generation/WORKSPACE"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3e1e6b8dd20fff9c1b5ed62e0a000ce85fb7bbe1",
      "new_mode": 33188,
      "new_path": "gazelle/python/testdata/binary_without_entrypoint_per_file_generation/lib.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "592a2dab8f8dfd9d1ba24444ed777d4b0f5176c9",
      "new_mode": 33188,
      "new_path": "gazelle/python/testdata/binary_without_entrypoint_per_file_generation/lib2.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c6e2d49c94977178466a1db391ebd3cd4987e26a",
      "new_mode": 33188,
      "new_path": "gazelle/python/testdata/binary_without_entrypoint_per_file_generation/lib_and_main.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a0682038449c6c30b28eb5e368ca6990c0e91737",
      "new_mode": 33188,
      "new_path": "gazelle/python/testdata/binary_without_entrypoint_per_file_generation/main.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "6f923b82c0e18a2dbbe1c63822f3b5ac98dc5a01",
      "new_mode": 33188,
      "new_path": "gazelle/python/testdata/binary_without_entrypoint_per_file_generation/main2.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2410223e5999e8b2ef1720863d19e2012a0974eb",
      "new_mode": 33188,
      "new_path": "gazelle/python/testdata/binary_without_entrypoint_per_file_generation/test.yaml"
    }
  ]
}
