1 # The current version of a module should not be considered when loading
2 # retractions. If the current version is +incompatible, we should not prefer
3 # +incompatible versions when looking for retractions.
4 # Verifies #42601.
5
6 go mod init m
7
8 # Request a +incompatible version retracted in v1.0.0.
9 go get example.com/retract/incompatible@v2.0.0+incompatible
10 stderr '^go: warning: example.com/retract/incompatible@v2.0.0\+incompatible: retracted by module author$'
11
12 # We should still see a warning if the +incompatible was previously in the
13 # build list.
14 go get example.com/retract/incompatible@v2.0.0+incompatible
15 stderr '^go: warning: example.com/retract/incompatible@v2.0.0\+incompatible: retracted by module author$'
16
View as plain text