aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/mod_get_patchcycle.txt
blob: 6600109d2dad9be00b39c17478dec0ec17f1a8f4 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# If a patch of a module requires a higher version of itself,
# it should be reported as its own conflict.
#
# This case is weird and unlikely to occur often at all, but it should not
# spuriously succeed.
# (It used to print v0.1.1 but then silently upgrade to v0.2.0.)

! go get example.net/a@patch
stderr '^go: example.net/a@patch \(v0.1.1\) requires example.net/a@v0.2.0, not example.net/a@patch \(v0.1.1\)$'  # TODO: A mention of b v0.1.0 would be nice.

-- go.mod --
module example

go 1.16

require example.net/a v0.1.0

replace (
	example.net/a v0.1.0 => ./a10
	example.net/a v0.1.1 => ./a11
	example.net/a v0.2.0 => ./a20
	example.net/b v0.1.0 => ./b10
)
-- example.go --
package example

import _ "example.net/a"

-- a10/go.mod --
module example.net/a

go 1.16
-- a10/a.go --
package a

-- a11/go.mod --
module example.net/a

go 1.16

require example.net/b v0.1.0
-- a11/a.go --
package a

import _ "example.net/b"

-- a20/go.mod --
module example.net/a

go 1.16
-- a20/a.go --
package a


-- b10/go.mod --
module example.net/b

go 1.16

require example.net/a v0.2.0
-- b10/b.go --
package b

import _ "example.net/a"