blob: 7be074973a933b602863f1a7444ffba2033a4d9a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
env GO111MODULE=on
# 'go list all' should fail with a reasonable error message
! go list all
stderr '^package m\n\timports m/a\n\timports m/b\n\timports m/a: import cycle not allowed'
# 'go list -e' should not print to stderr, but should mark all three
# packages (m, m/a, and m/b) as Incomplete.
go list -e -json all
! stderr .
stdout -count=3 '"Incomplete": true,'
-- go.mod --
module m
require (
m/a v0.0.0
m/b v0.0.0
)
replace (
m/a => ./a
m/b => ./b
)
-- m.go --
package m
import (
_ "m/a"
_ "m/b"
)
-- a/go.mod --
module m/a
-- a/a.go --
package a
import _ "m/b"
-- b/go.mod --
module m/b
-- b/b.go --
package b
import _ "m/a"
|