Skip to content

Commit aa9f4b2

Browse files
adonovangopherbot
authored andcommitted
go/analysis: document that facts are gob encoded in one gulp
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>
1 parent bdcd082 commit aa9f4b2

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
@@ -244,6 +244,9 @@ if the default encoding is unsuitable. Facts should be stateless.
244244
Because serialized facts may appear within build outputs, the gob encoding
245245
of a fact must be deterministic, to avoid spurious cache misses in
246246
build systems that use content-addressable caches.
247+
The driver makes a single call to the gob encoder for all facts
248+
exported by a given analysis pass, so that the topology of
249+
shared data structures referenced by multiple facts is preserved.
247250
248251
The Pass type has functions to import and export facts,
249252
associated either with an object or with a package:

0 commit comments

Comments
 (0)