)]}'
{
  "commit": "4762cd6a65abe496519dc0327b72c211ea8a25a8",
  "tree": "549113732144f661b4095c5905121b856b6bfd9b",
  "parents": [
    "9ca4797bbca6f785febcff7bc1508c83110a5de8"
  ],
  "author": {
    "name": "Andy Hochhaus",
    "email": "hochhaus@users.noreply.github.com",
    "time": "Mon Mar 02 05:10:22 2026 -0600"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Mar 02 11:10:22 2026 +0000"
  },
  "message": "Allow go_binary to override go_library x_defs (#4562)\n\n**What type of PR is this?**\n\nBug fix\n\n**What does this PR do? Why is it needed?**\n\nFixes #4561\n\n**Other notes for review**\n\nx_defs from dependencies were incorrectly applied after the source\u0027s\nx_defs, causing library values to overwrite binary values. Reverse the\norder so that source x_defs are applied last. This behavior matches the\ndocumentation which states:\n\n\nhttps://github.com/bazel-contrib/rules_go/blob/master/docs/go/core/defines_and_stamping.md\n\n  \u003e You can also override stamp values from libraries using x_defs on\n  \u003e the go_binary rule if needed.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8b17c1926e331e6606d9bc773645345ec71aefe2",
      "old_mode": 33188,
      "old_path": "go/private/actions/archive.bzl",
      "new_id": "fa4daad51e2ea886c0c6d31b866d2e934efb81d5",
      "new_mode": 33188,
      "new_path": "go/private/actions/archive.bzl"
    },
    {
      "type": "modify",
      "old_id": "afb5d94228b547e3d086457f9b46e59b85c5e3aa",
      "old_mode": 33188,
      "old_path": "tests/core/go_binary/BUILD.bazel",
      "new_id": "430a940c7e775db485722290e22e22c733f173bf",
      "new_mode": 33188,
      "new_path": "tests/core/go_binary/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "087d9475a8407e41255d38c3b7508969b0b2f75d",
      "new_mode": 33188,
      "new_path": "tests/core/go_binary/stamp_override_bin.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "41b67acec2fdb8d5302ea490cbdd37d7b5b10b85",
      "new_mode": 33188,
      "new_path": "tests/core/go_binary/stamp_override_lib.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e931f2ca2513b857ffd727364bc2cee3c7b815a4",
      "new_mode": 33188,
      "new_path": "tests/core/go_binary/stamp_override_test.go"
    }
  ]
}
