blob: d4658c65d40c4e389242bc38e7ce8497dc6ec22e [file] [log] [blame]
env GO111MODULE=on
[!symlink] skip
cd m
symlink symlink -> ../outside
cp go.mod go.mod.orig
# Issue 35941: suppress symlink warnings when running 'go mod tidy'.
# 'go mod tidy' should not scan packages in symlinked subdirectories.
go mod tidy
! stderr 'warning: ignoring symlink'
cmp go.mod go.mod.orig
! go build ./symlink
stderr '^symlink[\\/]symlink.go:3:8: module provides package and is replaced but not required; to add it:\n\tgo get$'
-- m/go.mod --
go 1.16
replace v0.1.0 => ../unresolved
-- m/a.go --
package a
-- outside/symlink.go --
package symlink
import _ ""
-- unresolved/go.mod --
go 1.16
-- unresolved/unresolved.go --
// Package unresolved exists, but 'go mod tidy' won't add it.
package unresolved