Commit 5cd4436
committed
internal/postgres: exclude internal packages when doing shortcut resolution
pkgsite allows users to use a shortcut when looking up std packages. For
example, pkg.go.dev/http will resolve to pkg.go.dev/net/http.
Currently, this shortcut resolution also works for internal packages
(e.g. pkg.go.dev/boring will resolve to
pkg.go.dev/crypto/internal/boring), even though Go users would likely
not care about internal packages.
An unfortunate side-effect of this is that our shortcut resolution does
not work for packages which has a similarly-named internal package:
pkg.go.dev/synctest does not resolve to pkg.go.dev/testing/synctest as
the existence of pkg.go.dev/internal/synctest makes the resolution
ambiguous.
This change updates our shortcut resolution logic to exclude all
internal packages.
For golang/go#76136
Change-Id: I83fcf32861079d051bc8dc3be29092480d53f667
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/717840
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Jonathan Amsterdam <[email protected]>
kokoro-CI: kokoro <[email protected]>
Reviewed-by: Nicholas Husin <[email protected]>1 parent 950d5ec commit 5cd4436
File tree
2 files changed
+22
-1
lines changed- internal
- frontend/fetchserver
- postgres
2 files changed
+22
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
164 | 172 | | |
165 | 173 | | |
166 | 174 | | |
| |||
686 | 694 | | |
687 | 695 | | |
688 | 696 | | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
689 | 707 | | |
690 | 708 | | |
691 | 709 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
0 commit comments