Skip to content

Commit

Permalink
go/analysis: document that facts are gob encoded in one gulp
Browse files Browse the repository at this point in the history
Fixes golang/go#54661

Change-Id: Iddae4d2ab54fc0527e060922351c52eec07c78c0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/454564
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Alan Donovan <adonovan@google.com>
Run-TryBot: Alan Donovan <adonovan@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
  • Loading branch information
adonovan authored and gopherbot committed Dec 2, 2022
1 parent bdcd082 commit aa9f4b2
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 @@ -244,6 +244,9 @@ 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 driver makes a single call to the gob encoder for all facts
exported by a given analysis pass, so that the topology of
shared data structures referenced by multiple facts is preserved.
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 aa9f4b2

Please sign in to comment.