)]}'
{
  "commit": "9037229852959576ad1f3aad39c835ff79011950",
  "tree": "d80171278a93b516c77c84f8f8ca945ef883e423",
  "parents": [
    "0c5b01e9f72cfc4f1c0c81bb20070f3e8cf74af6"
  ],
  "author": {
    "name": "David Zbarsky",
    "email": "dzbarsky@gmail.com",
    "time": "Sun Aug 02 04:43:40 2026 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Sun Aug 02 10:43:40 2026 +0200"
  },
  "message": "go: preserve race mode for go_source rules (#4674)\n\n**What type of PR is this?**\n\nBug fix\n\n**What does this PR do? Why is it needed?**\n\n`go_source` calls `go_context(..., maybe_needs_cc_toolchain \u003d False)`\nand intentionally does not declare a C/C++ toolchain. `go_context` still\ntreated the undeclared toolchain as unavailable, forced pure mode, and\nrejected race instrumentation. Preserve the configured mode for rules\nthat opt out and do not declare the C/C++ toolchain while retaining\nmissing-toolchain validation for normal Go rules. Add race-mode\nregression coverage for both standalone `go_source` and an embedding\n`go_library`.\n\n**Which issue(s) does this PR fix?**\n\nFixes #4673\n\n**Other notes for review**\n\nValidated with:\n\n```\nbazel test --jobs\u003d2 --local_test_jobs\u003d1 //tests/core/race:race_test //tests/core/starlark/cgo:missing_cc_toolchain_explicit_pure_off_test\n```",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7c4968e64a7a3da8b23d8c57a2e93d23d21ee93d",
      "old_mode": 33188,
      "old_path": "go/private/context.bzl",
      "new_id": "f981f71f2c30b3ff7c5529025f5f9d9d2ba65a32",
      "new_mode": 33188,
      "new_path": "go/private/context.bzl"
    },
    {
      "type": "modify",
      "old_id": "61c3e8af77b5a1b365ef556eebd9cd56d778ed07",
      "old_mode": 33188,
      "old_path": "tests/core/race/race_test.go",
      "new_id": "4b9dc2dba8e859c11960e03e8cd1db932a7ca802",
      "new_mode": 33188,
      "new_path": "tests/core/race/race_test.go"
    }
  ]
}
