...
1# The loader should not attempt to resolve imports of the "all", "std", and "cmd" meta-packages.
2
3! go list -deps ./importall
4! stderr 'internal error'
5stderr '^importall[/\\]x.go:3:8: "all" is not an importable package; see ''go help packages''$'
6
7! go list -deps ./importcmd
8! stderr 'internal error'
9stderr '^importcmd[/\\]x.go:3:8: "cmd" is not an importable package; see ''go help packages''$'
10
11! go list -deps ./importstd
12! stderr 'internal error'
13stderr '^importstd[/\\]x.go:3:8: "std" is not an importable package; see ''go help packages''$'
14
15
16# Not even if such a path is theoretically provided by a (necessarily replaced) module.
17
18go mod edit -replace std@v0.1.0=./modstd
19go mod edit -require std@v0.1.0
20
21! go list -deps ./importstd
22stderr '^importstd[/\\]x.go:3:8: "std" is not an importable package; see ''go help packages''$'
23
24
25-- go.mod --
26module example.com
27go 1.16
28-- importall/x.go --
29package importall
30
31import _ "all"
32-- importcmd/x.go --
33package importcmd
34
35import _ "cmd"
36-- importstd/x.go --
37package importstd
38
39import _ "std"
40-- modstd/go.mod --
41module std
42go 1.16
43-- modstd/std.go --
44// Package std is an incredibly confusingly-named package.
45package std
View as plain text