cmd/go: misleading error message when a dependency's go.mod is a symbolic link #40590
Labels
Milestone
Comments
If we did allow |
Kindly pinging you @jayconrod @bcmills @matloob, shall we punt this to Go1.17 or is there something else we can do for Go1.16? Thank you. |
Moving to Go1.17. I have a partially written CL for this, but it's surprisingly difficult to tell whether a file is a symbolic link in all supported VCS tools without checking out the whole revision. This will probably only be fixed for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go.mod
is a symbolic link to another file.What did you expect to see?
go.mod
was a symbolic link. Symbolic links aren't included in zip files, so this should be an error.go.mod
is downloaded, there should be a similar error. We usegit cat-file
to extractgo.mod
from a repository without checking other constraints, but we should check for this.gorelease
should report an error for this condition.Alternatively, we could make this work without error by changing the command used to extract
go.mod
files from repositories. For Git, we usegit cat-file
without--follow-symlinks
, which that prints the name of the file the link points to (resulting in weird error messages. If we used--follow-symlinks
then thego.mod
file would be usable by MVS but not included in the zip file.What did you see instead?
The text was updated successfully, but these errors were encountered: