Symlink warnings in 'go mod' tool output

767 views
Skip to first unread message

Caleb Spare

unread,
Nov 27, 2019, 7:27:20 PM11/27/19
to golang-nuts
I'm experimenting with converting a large source tree into a Go
module. This went pretty smoothly. However, I'm wondering why 'go mod
tidy' and 'go mod why' print warnings about symlinks.

These look like:

$ go mod tidy
warning: ignoring symlink /path/to/some/symlink/dir
...

Where a warning line is printed for every symlinked directory in the repo.

These warnings make these 'go mod' commands unpleasant to use (you
have to scroll through all the junk to see the relevant bits, if any,
at the bottom).

None of the Go code is in symlinked directories; these all exist for
certain projects in other languages. For example, one use of symlinks
is as a cheap way to use certain shared JS/CSS assets in multiple
sub-projects.

Am I holding this wrong, somehow? Can we remove the prints from the Go
tool? Or maybe it could only print the warning if there are .go files
somewhere in the symlinked dir?

If someone can confirm that I'm using the tools as intended, I'll file
a bug for further discussion.

Thanks!
Caleb

Caleb Spare

unread,
Dec 2, 2019, 9:29:31 PM12/2/19
to golang-nuts
Reply all
Reply to author
Forward
0 new messages