-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: generate a better error message for imports of nonexistent non-module paths #35734
Labels
Milestone
Comments
This has the same underlying cause as #34769. |
Change https://golang.org/cl/210339 mentions this issue: |
Change https://golang.org/cl/216817 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
Jan 29, 2020
…strings In CL 203820, we switched go/build to use the caller's working directory for the main module (rather than srcDir), so that go/build resolution now respects the requirements and replacements of the main module. When the passed-in srcDir is empty, as of that CL we use "go list" instead of falling back to in-process (GOPATH-mode) path lookup. Unfortunately, that broke go/build.TestImportDirNotExist when GO111MODULE=on: the test was looking for the specific error message produced by the in-process lookup. This change relaxes the test to accept the error message produced by "go list" when srcDir is empty. Updates #34769 Updates #34860 Updates #35734 Fixes #36867 Change-Id: Id0f7814a4b7dabe8917216eb013bb4eaee283648 Reviewed-on: https://go-review.googlesource.com/c/go/+/216817 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
I dont know
What operating system and processor architecture are you using (
go env
)?go env
Outputset GO111MODULE=
set GOARCH=386
set GOBIN=
set GOCACHE=C:\Users\RAHUL\AppData\Local\go-build
set GOENV=C:\Users\RAHUL\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=386
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=E:\go-work
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_386
set GCCGO=gccgo
set GO386=sse2
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m32 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\RAHUL\AppData\Local\Temp\go-build469851946=/tmp/go-build -gno-record-gcc-switches
What did you do?
$go mod init github.com/xxxx
$go build
What did you expect to see?
a builld of my project
What did you see instead?
build github.com/xxxx: cannot load xxxx/models: malformed module path "xxxx/models": missing dot in first path element
The text was updated successfully, but these errors were encountered: