blob: 4649491a532a8c7a8b20c88fde9aa16ca7b751be [file] [log] [blame]
env GO111MODULE=on
[short] skip
# @commit should resolve
# should resolve.
# Because of -d, the compiler should not run.
go get -d -x
! stderr 'compile|cp|gccgo .*language\.a$'
# go get should skip build with no Go files in root
go get -d
# dropping -d, we should see a build.
[short] skip
env GOCACHE=$WORK/gocache # Looking for compile commands, so need a clean cache.
go get -x
stderr 'compile|cp|gccgo .*language\.a$'
# BUG: after the build, the package should not be stale, as 'go install' would
# not do anything further.
go list -f '{{.Stale}}'
stdout ^true
# install after get should not run the compiler again.
go install -x
! stderr 'compile|cp|gccgo .*language\.a$'
# even with -d, we should see an error for unknown packages.
! go get -d -x
# get pseudo-version should record that version
go get -d
grep ' v0.0.0-20180214005840-23179ee8a569' go.mod
# but as commit should record as v1.5.1
go get -d
grep ' v1.5.1' go.mod
# go mod edit -require does not interpret commits
go mod edit -require
grep ' 23179ee' go.mod
# but other commands fix them
go mod graph
grep ' v1.5.1' go.mod
-- go.mod --
module x