)]}'
{
  "commit": "049866442fee7bb54fcb1a09e920953a0666e4b3",
  "tree": "5e2ece8e3a3a6ed68f556472a890b4804a8b622a",
  "parents": [
    "9429ae6446935059e79047654d3fe53d60aadc31"
  ],
  "author": {
    "name": "Kayce Basques",
    "email": "kaycebasques@gmail.com",
    "time": "Thu Jun 05 14:29:07 2025 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Jun 05 21:29:07 2025 +0000"
  },
  "message": "feat: add persistent worker for sphinxdocs (#2938)\n\nThis implements a simple, serialized persistent worker for Sphinxdocs\nwith several optimizations. It is enabled by default.\n\n* The worker computes what inputs have changed, allowing Sphinx to only\nrebuild what\n  is necessary.\n* Doctrees are written to a separate directory so they are retained\nbetween builds.\n* The worker tells Sphinx to write output to an internal directory, then\ncopies it\nto the expected Bazel output directory afterwards. This allows Sphinx to\nonly\n  write output files that need to be updated.\n\nThis works by having the worker compute what files have changed and\nhaving a Sphinx\nextension use the `get-env-outdated` event to tell Sphinx which files\nhave changed.\nThe extension is based on https://pwrev.dev/294057, but re-implemented\nto be\nin-memory as part of the worker instead of a separate extension projects\nmust configure.\n\nFor rules_python\u0027s doc building, this reduces incremental building from\nabout 8 seconds\nto about 0.8 seconds. From what I can tell, about half the time is spent\ngenerating\ndoctrees, and the other half generating the output files.\n\nWorker mode is enabled by default and can be disabled on the target or\nby adjusting\nthe Bazel flags controlling execution strategy. Docs added to explain\nhow.\n\nBecause `--doctree-dir` is now always specified and outside the output\ndir,\nnon-worker invocations can benefit, too, if run without sandboxing. Docs\nadded to\nexplain how to do this.\n\nAlong the way:\n\n* Remove `--write-all` and `--fresh-env` from run args. This lets direct\n  invocations benefit from the normal caching Sphinx does.\n* Change the args formatting to `--foo\u003dbar` so they are a single\nelement; just\n  a bit nicer to see when debugging.\n\n\nWork towards https://github.com/bazel-contrib/rules_python/issues/2878,\nhttps://github.com/bazel-contrib/rules_python/issues/2879\n\n---------\n\nCo-authored-by: Kayce Basques \u003ckayce@google.com\u003e\nCo-authored-by: Richard Levasseur \u003crlevasseur@google.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bd6448ced9b3cfdc17a53f0f2ff23bfcb833e48f",
      "old_mode": 33188,
      "old_path": "sphinxdocs/docs/index.md",
      "new_id": "2ea1146e1b8789158c49e5737a28026a412faec3",
      "new_mode": 33188,
      "new_path": "sphinxdocs/docs/index.md"
    },
    {
      "type": "modify",
      "old_id": "8d19d8705285ed5075388dd91698df5134499a48",
      "old_mode": 33188,
      "old_path": "sphinxdocs/private/sphinx.bzl",
      "new_id": "ee6b994e2e6599149b1b0628ead543e42368033a",
      "new_mode": 33188,
      "new_path": "sphinxdocs/private/sphinx.bzl"
    },
    {
      "type": "modify",
      "old_id": "3b7b32eaf693b69af410ebc4a79b16addff28d59",
      "old_mode": 33188,
      "old_path": "sphinxdocs/private/sphinx_build.py",
      "new_id": "e9711042f62bafdddd285a0edb266ddd14d4ac06",
      "new_mode": 33188,
      "new_path": "sphinxdocs/private/sphinx_build.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f6f70ba28c69f7d44ee9a3b6a6d97a24f50d4858",
      "new_mode": 33188,
      "new_path": "sphinxdocs/tests/sphinx_docs/doc1.md"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "06eb76a59675a4b009ee7daa277a583c9646d7d7",
      "new_mode": 33188,
      "new_path": "sphinxdocs/tests/sphinx_docs/doc2.md"
    }
  ]
}
