Граф коммитов

9 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Amsterdam eac14482e2 internal/postgres: read only one doc source from DB
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>
2021-04-29 21:01:19 +00:00
Jonathan Amsterdam 362afdf6f9 internal: don't panic on all/all
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>
2021-03-30 18:06:50 +00:00
Julie Qiu a2f4692c7e internal/frontend: add version history
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>
2021-03-09 21:48:37 +00:00
Julie Qiu a45850f691 internal/postgres: change buildcontext key in getSymbolHistory
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>
2021-02-23 16:18:07 +00:00
Jonathan Amsterdam 7425dc1e51 internal: support "all" in BuildContext
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>
2021-02-08 16:18:02 +00:00
Jonathan Amsterdam 33309b4d71 Revert "internal: support "all" in BuildContext"
This reverts commit 5289fe63bf.

Reason for revert: breaks build

Change-Id: Iedc647645373a2c3e1ddf6a414564edfc4cae406
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/290069
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Jonathan Amsterdam <jba@google.com>
2021-02-05 18:38:51 +00:00
Jonathan Amsterdam 5289fe63bf internal: support "all" in BuildContext
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>
2021-02-05 17:58:23 +00:00
Jonathan Amsterdam 015f5dba84 internal/frontend: support GOOS/GOARCH query params
For golang/go#37232

Change-Id: I657fac293fdc6970ee71805b00b06086a7d4d5c7
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/289238
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
2021-02-03 22:07:13 +00:00
Jonathan Amsterdam c0b57ff701 internal: put build context information in a single place
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>
2021-01-29 22:10:21 +00:00