| env GO111MODULE=on |
| |
| # @commit should resolve |
| |
| # go get should skip build with no Go files in root |
| go get golang.org/x/text@14c0d48 |
| |
| # ... and go get should skip build with -m |
| go get -m golang.org/x/text@14c0d48 |
| |
| # golang.org/x/text/language@commit should not resolve with -m, |
| # because that's not a module path. |
| ! go get -m golang.org/x/text/language@14c0d48 |
| |
| # ... but it should work without -m. |
| # because of -d, the compiler should not run |
| go get -d -x golang.org/x/text/language@14c0d48 |
| ! stderr 'compile|cp|gccgo .*language\.a$' |
| |
| # dropping -d, we should see a build. |
| go get -x golang.org/x/text/language@14c0d48 |
| stderr 'compile|cp|gccgo .*language\.a$' |
| |
| # even with -d, we should see an error for unknown packages. |
| ! go get -d -x golang.org/x/text/foo@14c0d48 |
| |
| # get pseudo-version should record that version |
| go get rsc.io/quote@v0.0.0-20180214005840-23179ee8a569 |
| grep 'rsc.io/quote v0.0.0-20180214005840-23179ee8a569' go.mod |
| |
| # but as commit should record as v1.5.1 |
| go get rsc.io/quote@23179ee8 |
| grep 'rsc.io/quote v1.5.1' go.mod |
| |
| # go mod -require does not interpret commits |
| go mod -require rsc.io/quote@23179ee |
| grep 'rsc.io/quote 23179ee' go.mod |
| |
| # but go mod -fix fixes them |
| go mod -fix |
| grep 'rsc.io/quote v1.5.1' go.mod |
| |
| -- go.mod -- |
| module x |