Skip to content

cmd/go: modules with empty go.mod files not diagnosed well #25272

Closed
@IngCr3at1on

Description

@IngCr3at1on

I can't actually decide if this is a bug or just me doing something wrong....

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

go version go1.10.1 linux/amd64
go version go1.10.1 linux/amd64 vgo:2018-02-20.1

Does this issue reproduce with the latest release?

Yes

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

GOARCH="amd64"
GOBIN="/home/ing/ply/go/bin"
GOCACHE="/home/ing/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ing/ply/go"
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build144176356=/tmp/go-build -gno-record-gcc-switches"

What did you do?

in a working directly create a main:

package main // import "github.com/IngCr3at1on/bugexample"

import (
	"github.com/JustAnotherOrganization/l5424"
	"github.com/JustAnotherOrganization/l5424/x5424"
)

func main() {
	log := x5424.New().NewEntry(l5424.FacilityKernel)
	log.Alertln("Foo")
	log.Noticeln("Bar")
}

and a go.mod
touch go.mod

Or simply pull down github.com/IngCr3at1on/bugexample

What did you expect to see?

The program should compile

What did you see instead?

vgo: resolving import "github.com/JustAnotherOrganization/l5424"
vgo: finding github.com/JustAnotherOrganization/l5424 (latest)
vgo: adding github.com/JustAnotherOrganization/l5424 v0.1.0
vgo: import "github.com/JustAnotherOrganization/l5424/x5424" [/home/ing/ply/go/src/v/github.com/JustAnotherOrganization/[email protected]/x5424]: open /home/ing/ply/go/src/v/github.com/JustAnotherOrganization/[email protected]/x5424: no such file or directory

Initially only the tag v0.1.0 existed; someone in the #vgo channel on Gopher's Slack suggested I add the tag x5424/v0.1.0 but that doesn't seem to make a difference.


It's worth adding that the issue reminds me of #24605 but I'm not sure if they're the same...

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsFixThe path to resolution is known, but the work has not been done.modules

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions