)]}'
{
  "commit": "8952d114093dab5c42aa6ed9ffb7e7d400c5bb1a",
  "tree": "5a8a613c49bd04bf2190ac5202b7cbcd342fe771",
  "parents": [
    "5ddb5172f9d5e3843de9c45d5d659f4fa38812df"
  ],
  "author": {
    "name": "Robert Findley",
    "email": "rfindley@anthropic.com",
    "time": "Thu May 28 11:41:23 2026 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu May 28 17:41:23 2026 +0200"
  },
  "message": "fix: produce facts of required analyzers in nogo facts-only mode (#4615)\n\n**What type of PR is this?**\n\nBug fix\n\n**What does this PR do? Why is it needed?**\n\nIn facts-only compiles (packages outside the nogo `includes`, which\nincludes every external repository), nogo keeps an analyzer only if it\ndeclares `FactTypes` itself:\n\n```go\nif !factsOnly || len(a.FactTypes) \u003e 0 {\n```\n\nAnalyzers whose facts are produced by a *required* sub-analyzer are\ndropped entirely, so their requirement closure never runs and downstream\npackages never see those facts. The common shape is a checker that\nrequires a fact-exporting analyzer: staticcheck\u0027s SA1019 (use of\ndeprecated identifiers) requires its deprecation fact analyzer and\ndeclares no fact types of its own, so deprecation facts are never\nproduced for external repositories and uses of deprecated third-party\nAPIs in the main repository are silently missed. Analyzers like `printf`\nare unaffected only because they happen to declare their fact type\ndirectly.\n\nThis PR keeps an analyzer in facts-only mode when anything in its\nrequirement closure declares fact types, which matches the intent of the\nexisting comment (\"all analyzers that don\u0027t generated facts can be\nskipped\").\n\nVerified against a large monorepo by patching its rules_go: with the\nfix, SA1019 immediately reported uses of deprecated identifiers declared\nin external module dependencies that were silently missed before, while\nexternal packages themselves still produced no diagnostics.\n\n**Which issues(s) does this PR fix?**\n\nNo existing issue that I could find; happy to file one if preferred.\n\n**Other notes for review**\n\nThe new `tests/core/nogo/bzlmod/facts_only_test.go` pins the behavior\nwith a pair of custom analyzers mirroring the deprecation shape: the\nfact producer is only required, the nogo-registered analyzer declares no\nfact types, and the marked function is declared in a package outside the\nnogo `includes`. The first test fails without the `nogo_main.go` change\nand passes with it; the second checks that facts-only compiles still\nreport no diagnostics of their own.\n\nFixes #4616",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3b8d77567ac8a4364c80bf3572125fcc4dd129f4",
      "old_mode": 33188,
      "old_path": "go/private/actions/compilepkg.bzl",
      "new_id": "9c067b27f009fa83cea9ed7f61bc424de32c599b",
      "new_mode": 33188,
      "new_path": "go/private/actions/compilepkg.bzl"
    },
    {
      "type": "modify",
      "old_id": "69abf724b92e24587da11f039d49e7f7ad0fdf01",
      "old_mode": 33188,
      "old_path": "go/tools/builders/nogo_main.go",
      "new_id": "76bf1ae6401f0ad22175447fead75b62d178336b",
      "new_mode": 33188,
      "new_path": "go/tools/builders/nogo_main.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "85fca0826fd786d25400ca916f634c1857517d87",
      "new_mode": 33188,
      "new_path": "tests/core/nogo/facts_only/BUILD.bazel"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ec7b798f84b0a0d60b15585f11bd0b265a7db04d",
      "new_mode": 33188,
      "new_path": "tests/core/nogo/facts_only/facts_only_test.go"
    }
  ]
}
