Skip to content

cmd/go: no helpful error message for "no Go files" with modules #27122

Closed
@FiloSottile

Description

@FiloSottile

Without modules, the go tool informs me that I'm trying to build a package with no Go files:

$ go1.11rc1 build ./vcs-test
can't load package: package golang.org/x/build/vcs-test: no Go files in /Users/filippo/src/golang.org/x/build/vcs-test

With modules, I get an obscure error:

$ GO111MODULE=on go1.11rc1 build ./vcs-test
go: finding golang.org/x/build/vcs-test latest
can't load package: package golang.org/x/build/vcs-test: unknown import path "golang.org/x/build/vcs-test": cannot find module providing package golang.org/x/build/vcs-test

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.modules

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions