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/vgo:cannot find module providing package #26526

Closed
tolidano opened this issue Jul 22, 2018 · 4 comments
Closed

x/vgo:cannot find module providing package #26526

tolidano opened this issue Jul 22, 2018 · 4 comments

Comments

@tolidano
Copy link

make this simple file:

shawn@gallium:~/go/src/github.com/tolidano/construct$ head construct.go
package construct

import (
"github.com/YuriyNasretdinov/GoSSHa"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
)

try to vgo get:
shawn@gallium:~/go/src/github.com/tolidano/construct$ vgo get github.com/YuriyNasretdinov/GoSSHa
go: finding github.com/YuriyNasretdinov/GoSSHa latest
go get github.com/YuriyNasretdinov/GoSSHa: cannot find module providing package github.com/YuriyNasretdinov/GoSSHa

but go get:
shawn@gallium:~/go/src/github.com/tolidano/construct$ go get github.com/YuriyNasretdinov/GoSSHa

my env:
shawn@gallium:~/go/src/github.com/tolidano/construct$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/shawn/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/shawn/go"
GORACE=""
GOROOT="/usr/lib/go-1.10"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.10/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-build747897478=/tmp/go-build -gno-record-gcc-switches"

go and vgo version:
shawn@gallium:~/go/src/github.com/tolidano/construct$ vgo version
go version go1.10 linux/amd64 vgo:devel +88c76dcbab

So, I figured vgo would work? I'm on GalliumOS, basically Kubuntu. Installed like this:
sudo apt-get install golang -y
sudo apt-get install golang-1.10-go -y

@gopherbot gopherbot added this to the vgo milestone Jul 22, 2018
@agnivade
Copy link
Contributor

agnivade commented Jul 22, 2018

Now since vgo is integrated with the main repo, could you try with 1.11beta2 ? Unless you have any specific limitation, you should not need vgo anymore.

EDIT: Do you have an old git version < 2.10 ? Check #26501

@myitcv
Copy link
Member

myitcv commented Jul 23, 2018

@tolidano I'm not sure what your example is trying to achieve? Because it appears to be importing a main package:

cd `mktemp -d`
mkdir construct
cd construct
go mod -init -module example.com/construct
cat <<EOD > construct.go
package construct

import (
        _ "github.com/YuriyNasretdinov/GoSSHa"
        _ "github.com/aws/aws-sdk-go/aws"
        _ "github.com/aws/aws-sdk-go/aws/session"
)
EOD
go test

Using go version devel +48c79734ff

I'll close this for now because I don't think there are any module related issues here, but please shout if there's anything I've missed.

@myitcv myitcv closed this as completed Jul 23, 2018
@myitcv
Copy link
Member

myitcv commented Jul 23, 2018

Sorry, sent the above without actually including the output:

go: finding github.com/YuriyNasretdinov/GoSSHa latest
go: finding github.com/aws/aws-sdk-go/aws/session latest
go: finding github.com/aws/aws-sdk-go/aws latest
go: downloading github.com/YuriyNasretdinov/GoSSHa v0.0.0-20170620125610-f451327954cf
go: finding github.com/aws/aws-sdk-go v1.14.31
go: downloading github.com/aws/aws-sdk-go v1.14.31
go: finding github.com/go-ini/ini v1.25.4
go: finding github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8
go: downloading github.com/go-ini/ini v1.25.4
go: downloading github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8
go: finding golang.org/x/crypto/ssh latest
go: finding golang.org/x/crypto/ssh/agent latest
go: finding golang.org/x/crypto latest
go: downloading golang.org/x/crypto v0.0.0-20180718160520-a2144134853f
construct.go:4:9: import "github.com/YuriyNasretdinov/GoSSHa" is a program, not an importable package

@tolidano
Copy link
Author

tolidano commented Jul 23, 2018 via email

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

4 participants