Skip to content

Commit 43cce67

Browse files
committed
go/analysis: document need for deterministic Fact encoding
Change-Id: I5a1b537f5ba14405fa1e9916b6d63e4fc7e5db45 Reviewed-on: https://go-review.googlesource.com/c/tools/+/410364 Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
1 parent af82757 commit 43cce67

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

go/analysis/doc.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ Consequently, Facts must be serializable. The API requires that drivers
241241
use the gob encoding, an efficient, robust, self-describing binary
242242
protocol. A fact type may implement the GobEncoder/GobDecoder interfaces
243243
if the default encoding is unsuitable. Facts should be stateless.
244+
Because serialized facts may appear within build outputs, the gob encoding
245+
of a fact must be deterministic, to avoid spurious cache misses in
246+
build systems that use content-addressable caches.
244247
245248
The Pass type has functions to import and export facts,
246249
associated either with an object or with a package:

0 commit comments

Comments
 (0)