Slack thread context:
https://bazelbuild.slack.com/archives/CA31HN1T3/p1668109501597109
Curious if anyone has thought about a more robust way to detect/prevent analysis cache discards. It's a classic Bazel "foot-gun" that "you forgot to pass --mumble_mumble to your bazel info command and that's why your subsequent bazel build is taking minutes."
There are some buried features like --max_config_changes_to_show which help a savvy user to debug the analysis cache discard, but a novice user or even a savvy one supporting lots of Bazel deployments can't keep up with a reactive "fix it when it's a problem" approach.
Has anyone thought harder about this problem? I'm imagining some way to say "put my Bazel in a mode where analysis cache discards or server restarts are an error" so that we can enable that mode on CI for example. As a strawman, you could imagine a marker file in the output base indicating this behavior.
-Alex