If GetUnit is passed a build context, it will read documentation
source only for that build context. It still reads all the build
context values, just only one serialized blob of file ASTs.
This sped up getUnitWithAllFields by about 2x on net/http, using
detail-stats against the staging DB from a local frontend.
Change-Id: Ib8e988940b7f8f8ef2c270129c4338bb3d56b9eb
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/312269
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
If CompareBuildContexts sees all/all, it prefers it instead of
panicking.
Change-Id: I50ff46fa2bbad47cfe5539297a08744dd62b261c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/305969
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Symbol history is added to the versions page, for when a symbol is first
introduced to the package API.
For golang/go#37102
Change-Id: I22b7bc959a464dc38fe0bd39244c997fd51370f1
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/298309
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Instead of using a custom string as the key in getSymbolHistory, just
use internal.BuildContext.
For golang/go#37102
Change-Id: I87feabd36a6b33fc9a34bd5cf3ab0012bdbbf012
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/294689
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Handle BuildContexts where one or more parts are "all".
These should only occur when searching for a matching Documentation,
not sorting. (Because we sort only when there is more than one
Documentation, and if there is an all/all Documentation then there
aren't any others.)
For golang/go#37232
Change-Id: I898aba8f73d2682798d56c47cc6773709f10c702
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/290094
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Handle BuildContexts where one or more parts are "all".
These should only occur when searching for a matching Documentation,
not sorting. (Because we sort only when there is more than one
Documentation, and if there is an all/all Documentation then there
aren't any others.)
Change-Id: Ibe28bd78fa278c042d1459f7046bfe8eef49bbac
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/289679
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
In forthcoming CLs, we will need to manipulate and compare
Go build contexts (GOOS/GOARCH pairs). Define a struct
for them and put it and support functions in a common
package.
Change-Id: I15d00556fa39e32d1db367f4d33276632300dcbe
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/288213
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>