You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional note: This is a problem when we use Bazel with Go. When using Bazel it auto creates bazel-<current-dir-name> symlink, and we have a project with ".go" suffix in its name (https://github.com/reddit/baseplate.go) so if we use default git clone directory name, bazel will create bazel-baseplate.go symlink, which will cause errors with the go command. Some of those errors are harmless but some do cause problems, so we have to rename clone it to work around this issue.
cagedmantis
changed the title
Go command isn't handling symlinks to directories named as *.go correctly
cmd/go: go command isn't handling symlinks to directories named as *.go correctly
Jun 25, 2020
Turns out to be a very simple fix. This does not appear to be a regression in 1.14; I'm not sure whether it should go into 1.15 (since we're deep into the code freeze) or wait for 1.16.
bcmills
changed the title
cmd/go: go command isn't handling symlinks to directories named as *.go correctly
go/build: symlinks named *.go that refer to directories should not be treated as source files
Jun 26, 2020
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?
This is the minimal sequence of commands to reproduce the issue:
What did you expect to see?
go toolchain should ignore
bar.go
as it's a symlink to a directory, similar to how they ignoredfoo.go
before.What did you see instead?
go toolchain throws error.
The text was updated successfully, but these errors were encountered: