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

cmd/go: 1.11.beta3 some package failed with "cannot find module providing package" #26916

Closed
vbatoufflet opened this issue Aug 10, 2018 · 2 comments

Comments

@vbatoufflet
Copy link

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

go version go1.11beta3 darwin/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="/Users/vincent/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/vincent/.opt/lib/go:/Users/vincent/Development/go"
GOPROXY=""
GORACE=""
GOROOT="/Users/vincent/sdk/go1.11beta3"
GOTMPDIR=""
GOTOOLDIR="/Users/vincent/sdk/go1.11beta3/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/vincent/Development/go/src/github.com/vbatoufflet/prometheus-test/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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/jd/ttpgc_yd3nd10948pk223tnw0000gp/T/go-build551768112=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

I try to used the new Go mod support available on both vgo and Go 1.11 beta along with Prometheus client library.

I produced a minimal Go program the highlight the issue:

package main

import (
	"fmt"

	api "github.com/prometheus/client_golang/api/prometheus/v1"
)

func main() {
	fmt.Println(api.HealthGood)
}

What did you expect to see?

A successful build.

What did you see instead?

The go mod is unable to find the module. Everything seems fine with any other import. But not with the ones from Prometheus:

GO111MODULE=on go1.11beta3 mod init
GO111MODULE=on go1.11beta3 build
go: finding github.com/prometheus/client_golang/api/prometheus latest
go: finding github.com/prometheus/client_golang/api latest
go: import "github.com/vbatoufflet/prometheus-test" ->
	import "github.com/prometheus/client_golang/api/prometheus/v1": cannot find module providing package github.com/prometheus/client_golang/api/prometheus/v1
@vbatoufflet vbatoufflet changed the title Some package failed with "cannot find module providing package" cmd/go: 1.11.beta3 some package failed with "cannot find module providing package" Aug 10, 2018
@bcmills
Copy link
Contributor

bcmills commented Aug 10, 2018

Dup of #26602, fixed at head.

@bcmills bcmills closed this as completed Aug 10, 2018
@vbatoufflet
Copy link
Author

Hi @bcmills, thanks for the info!

@golang golang locked and limited conversation to collaborators Aug 10, 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

3 participants