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'
5 stderr '^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'
9 stderr '^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'
13 stderr '^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
18 go mod edit -replace std@v0.1.0=./modstd
19 go mod edit -require std@v0.1.0
20
21 ! go list -deps ./importstd
22 stderr '^importstd[/\\]x.go:3:8: "std" is not an importable package; see ''go help packages''$'
23
24
25 -- go.mod --
26 module example.com
27 go 1.16
28 -- importall/x.go --
29 package importall
30
31 import _ "all"
32 -- importcmd/x.go --
33 package importcmd
34
35 import _ "cmd"
36 -- importstd/x.go --
37 package importstd
38
39 import _ "std"
40 -- modstd/go.mod --
41 module std
42 go 1.16
43 -- modstd/std.go --
44 // Package std is an incredibly confusingly-named package.
45 package std
46
View as plain text