Skip to content

Commit

Permalink
go/analysis: document need for deterministic Fact encoding
Browse files Browse the repository at this point in the history
Change-Id: I5a1b537f5ba14405fa1e9916b6d63e4fc7e5db45
Reviewed-on: https://go-review.googlesource.com/c/tools/+/410364
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
  • Loading branch information
adonovan committed Jun 6, 2022
1 parent af82757 commit 43cce67
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go/analysis/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ Consequently, Facts must be serializable. The API requires that drivers
use the gob encoding, an efficient, robust, self-describing binary
protocol. A fact type may implement the GobEncoder/GobDecoder interfaces
if the default encoding is unsuitable. Facts should be stateless.
Because serialized facts may appear within build outputs, the gob encoding
of a fact must be deterministic, to avoid spurious cache misses in
build systems that use content-addressable caches.
The Pass type has functions to import and export facts,
associated either with an object or with a package:
Expand Down

0 comments on commit 43cce67

Please sign in to comment.