From 521a14707ef34ef559af5dcd523b34e76f1e3070 Mon Sep 17 00:00:00 2001 From: Andrey Babanin Date: Thu, 26 Mar 2026 14:39:35 +0100 Subject: [PATCH] Disable persistent workers in sphinx_docs Persistent workers cause Bazel cache corruption when external dependency versions change (stale symlinks remain visible to Sphinx). There is a performance cost to disabling this feature. --- docs.bzl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs.bzl b/docs.bzl index a7a730e8..1ad487c9 100644 --- a/docs.bzl +++ b/docs.bzl @@ -294,6 +294,9 @@ def docs(source_dir = "docs", data = [], deps = [], scan_code = [], known_good = sphinx = ":sphinx_build", tools = data, visibility = ["//visibility:public"], + # Persistent workers cause stale symlinks after dependency version + # changes, corrupting the Bazel cache. + allow_persistent_workers = False, ) sphinx_module(