github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/mod_get_commit.txt (about) 1 env GO111MODULE=on 2 env GOPROXY=$GOPROXY/quiet 3 [short] skip 4 5 # @commit should resolve 6 7 # golang.org/x/text/language@commit should resolve. 8 # Because of -d, the compiler should not run. 9 go get -d -x golang.org/x/text/language@14c0d48 10 ! stderr 'compile|cp|gccgo .*language\.a$' 11 12 # go get should skip build with no Go files in root 13 go get -d golang.org/x/text@14c0d48 14 15 # dropping -d, we should see a build. 16 [short] skip 17 go get -x golang.org/x/text/language@14c0d48 18 stderr 'compile|cp|gccgo .*language\.a$' 19 20 # BUG: after the build, the package should not be stale, as 'go install' would 21 # not do anything further. 22 go list -f '{{.Stale}}' golang.org/x/text/language 23 stdout ^true 24 25 # install after get should not run the compiler again. 26 go install -x golang.org/x/text/language 27 ! stderr 'compile|cp|gccgo .*language\.a$' 28 29 # even with -d, we should see an error for unknown packages. 30 ! go get -d -x golang.org/x/text/foo@14c0d48 31 32 # get pseudo-version should record that version 33 go get rsc.io/quote@v0.0.0-20180214005840-23179ee8a569 34 grep 'rsc.io/quote v0.0.0-20180214005840-23179ee8a569' go.mod 35 36 # but as commit should record as v1.5.1 37 go get rsc.io/quote@23179ee8 38 grep 'rsc.io/quote v1.5.1' go.mod 39 40 # go mod edit -require does not interpret commits 41 go mod edit -require rsc.io/quote@23179ee 42 grep 'rsc.io/quote 23179ee' go.mod 43 44 # but other commands fix them 45 go mod graph 46 grep 'rsc.io/quote v1.5.1' go.mod 47 48 -- go.mod -- 49 module x