1 env GO111MODULE=on
2
3 # golang.org/issue/31248: loading the build list must not add explicit entries
4 # for indirect dependencies already implied by older-than-selected versions
5 # already in the build list.
6
7 cp go.mod.orig go.mod
8 go mod tidy
9 cmp go.mod go.mod.orig
10
11 cp go.mod.orig go.mod
12 go list -m all
13 cmp go.mod go.mod.orig
14
15 -- go.mod.orig --
16 module main
17
18 go 1.13
19
20 require a v0.0.0
21
22 replace (
23 a v0.0.0 => ./a
24 b v0.0.0 => ./b
25 i v0.0.0 => ./i
26 x v0.1.0 => ./x1
27 x v0.2.0 => ./x2
28 )
29 -- main.go --
30 package main
31
32 import _ "a"
33
34 func main() {}
35 -- a/go.mod --
36 module a
37 go 1.13
38 require (
39 x v0.2.0
40 b v0.0.0
41 )
42 -- a/a.go --
43 package a
44 -- b/go.mod --
45 module b
46 go 1.13
47 require x v0.1.0
48 -- x1/go.mod --
49 module x
50 go 1.13
51 require (
52 b v0.0.0
53 i v0.0.0
54 )
55 -- x2/go.mod --
56 module x
57 go 1.13
58 -- i/go.mod --
59 module i
60 go 1.13
61
View as plain text