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

Packages in vendor/ are not found #14

Closed
rngtng opened this issue Dec 19, 2016 · 8 comments
Closed

Packages in vendor/ are not found #14

rngtng opened this issue Dec 19, 2016 · 8 comments

Comments

@rngtng
Copy link

rngtng commented Dec 19, 2016

Hey, I tried to use go-pry in a project where external packages are below vendor/. Go pry keeps saying packages not found:

panic: cannot find package "github.com/google/go-github/github" in any of:
	/usr/local/go/src/github.com/google/go-github/github (from $GOROOT)
	/src/github.com/google/go-github/github (from $GOPATH)

it's actually in /src//vendor/github.com/google/go-github/github

Could you give me some pointers how to fix this pls?

@d4l3k d4l3k closed this as completed in 86400ca Dec 20, 2016
@d4l3k
Copy link
Owner

d4l3k commented Dec 20, 2016

I just added example/vendoring as well as fixed a bug where the vendor dir wasn't resolved for some reason.

Let me know if you run into any other issues!

@rngtng
Copy link
Author

rngtng commented Dec 21, 2016

Thanks, this looks way better now, but didn't fully fix the problem. Now the error is:

panic: failed to TypeCheck: /src/<project>/main.go:8:3: could not import github.com/google/go-github/github (can't find import: <project>/vendor/github.com/google/go-github/github)

goroutine 1 [running]:
panic(0x8476c0, 0xc420341440)
	/usr/local/go/src/runtime/panic.go:500 +0x1a1
<project>/vendor/github.com/d4l3k/go-pry/pry.Apply(0xc420014700)
	/src/<project>/vendor/github.com/d4l3k/go-pry/pry/pry.go:38 +0x1834
main.main()
	/src/<project>/main.go:110 +0x9c60
exit status 2
Reverting files

looks like the leading slash is missing here: <project>/vendor/github.com/google/go-github/github

@d4l3k d4l3k reopened this Dec 25, 2016
@Gonzih
Copy link

Gonzih commented Jul 17, 2017

I have similar issue now. I provision my dependencies using glide and go-pry cant load dependencies from vendor folder it seems. go run and go test both work fine in this project. Should I provide extra information about my environment?

Thanks!

@d4l3k
Copy link
Owner

d4l3k commented Jul 19, 2017

It'd definitely be helpful to have more information. Trying to track down this issue

@d4l3k
Copy link
Owner

d4l3k commented Jul 19, 2017

Looks like this is related to golang/go#11415 .Might be able to fix this by switching to https://github.com/metakeule/importer.

For now the workaround is running go install on the vendored packages (which is lame).

@alikhajeh1
Copy link

Do I understand it correctly that we'd have to run go install ... for each package in glide.yaml - and also their dependencies to make go-pry work with glide?

@d4l3k
Copy link
Owner

d4l3k commented Aug 15, 2017 via email

@d4l3k
Copy link
Owner

d4l3k commented Jul 26, 2021

this should be fixed

@d4l3k d4l3k closed this as completed Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants