Skip to content

cmd/go: explicitly reject packages whose source files contain leading dots #30270

Open
@ghost

Description

What version of Go are you using (go version)?

go1.11.1 darwin/amd64

Does this issue reproduce with the latest release?

Yes, tested with:

go1.12rc1 darwin/amd64

But at least the latest version shows the ._ filename being processed, and generates 'unexpected NUL in input'

What operating system and processor architecture are you using (go env)?


GOARCH="amd64"
GOBIN="/Users/peter/go/bin"
GOCACHE="/Users/peter/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"

What did you do?

go build

What did you expect to see?

module to build without errors, which it does after deleting the spurious ._<filename>.go file.

Probably the go command line tools should be ignoring these system files.

What did you see instead?

fails with "cannot find package"
I initially thought this was related to #27238 but I think it is a different problem specific to macos. However it might be worth adding a link from there in case anyone else has this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GoCommandcmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-Darwin

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions