Skip to content
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

/x/text go.mod does not resolve correct package #27429

Closed
BTBurke opened this issue Aug 31, 2018 · 5 comments
Closed

/x/text go.mod does not resolve correct package #27429

BTBurke opened this issue Aug 31, 2018 · 5 comments

Comments

@BTBurke
Copy link

BTBurke commented Aug 31, 2018

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

go version go1.11 linux/amd64

Does this issue reproduce with the latest release?

Yes

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/btburke/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/btburke/projects/golang"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/btburke/projects/go-git/go.mod"
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-build221368368=/tmp/go-build -gno-record-gcc-switches"

What did you do?

git clone https://github.com/src-d/go-git
go mod init
go build

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

What did you expect to see?

I expected it to correctly find all dependencies and create go.mod and go.sum

What did you see instead?

go: finding golang.org/x/text/unicode/norm latest
go: finding golang.org/x/text/unicode latest
utils/merkletrie/noder/path.go:7:2: unknown import path "golang.org/x/text/unicode/norm": cannot find module providing package golang.org/x/text/unicode/norm
@agnivade
Copy link
Contributor

agnivade commented Sep 1, 2018

I could not reproduce this. Build worked just fine.

IIRC, I have seen errors like that before, and usually it went away with a retry. Could you try cleaning your modcache and build again ?

@BTBurke
Copy link
Author

BTBurke commented Sep 1, 2018

Weird. I cleared my cache and it builds on one computer and not the other. Must be me. Sorry for the hassle.

@BTBurke BTBurke closed this as completed Sep 1, 2018
@erkattak
Copy link

I am seeing this same issue on my windows machine

go version go1.11.2 windows/amd64
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\erik\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\erik\go
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\erik\Projects\example\go.mod
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=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\erik\AppData\Local\Temp\go-build577259682=/tmp/go-build -gno-record-gcc-switches
PS C:\Users\erik\Projects\example> go build .\...
go: finding golang.org/x/text/unicode/norm latest
go: finding golang.org/x/text/secure/bidirule latest
go: finding golang.org/x/text/unicode/bidi latest
go: finding golang.org/x/text/secure latest
go: finding golang.org/x/text/unicode latest
..\..\go\pkg\mod\golang.org\x\net@v0.0.0-20181108082009-03003ca0c849\idna\idna.go:23:2: unknown import path "golang.org/x/text/secure/bidirule": cannot find module providing package golang.org/x/text/secure/bidirule
..\..\go\pkg\mod\golang.org\x\net@v0.0.0-20181108082009-03003ca0c849\idna\idna.go:24:2: unknown import path "golang.org/x/text/unicode/bidi": cannot find module providing package golang.org/x/text/unicode/bidi
..\..\go\pkg\mod\golang.org\x\net@v0.0.0-20181108082009-03003ca0c849\idna\idna.go:25:2: unknown import path "golang.org/x/text/unicode/norm": cannot find module providing package golang.org/x/text/unicode/norm

@cmendible
Copy link

cmendible commented Nov 23, 2018

go clean -modcache did the trick for me @brkattk...

@erkattak
Copy link

yes, clearing the cache worked. forgot to post back. thanks!

@golang golang locked and limited conversation to collaborators Nov 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants