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

internal error: nil Pkg importing "errors" from "mypkg" #118

Closed
kevinburke1 opened this issue Oct 22, 2019 · 3 comments · Fixed by #120
Closed

internal error: nil Pkg importing "errors" from "mypkg" #118

kevinburke1 opened this issue Oct 22, 2019 · 3 comments · Fixed by #120

Comments

@kevinburke1
Copy link

kevinburke1 commented Oct 22, 2019

I can only reproduce this with a "package main" Go binary in the same directory as go.mod - if I have a main that's nested several directories under go.mod, I can't reproduce. I also can't reproduce in libraries.

Steps to reproduce:

  • Clone https://github.com/jmhodges/justrun - I put it in GOPATH but I don't think it matters.
  • Configure vim-go at tip (2aa7c9d00af14ae71fdfe46f6a52b0a4f0fac774)
  • configure x/tools at tip (ed542cd5b28ad1b474f8ff7ca112cad2c3ac2dc8), golang/go at tip (93a601dd2a)

Run

godef -f=$GOPATH/src/github.com/jmhodges/justrun/watch.go '-o=504' '-t'

I get the following error:

2019/10/22 09:35:08 internal error: nil Pkg importing "errors" from "github.com/jmhodges/justrun"
@hyangah
Copy link
Contributor

hyangah commented Feb 27, 2020

Maybe dup of golang/go#33554 which can be fixes with updating x/tools dependency.

hyangah added a commit to hyangah/godef that referenced this issue Feb 27, 2020
Also update the vendor directory.

Fixes rogpeppe#118
hyangah added a commit to hyangah/godef that referenced this issue Feb 27, 2020
Also update the vendor directory.

Fixes rogpeppe#118
@hus787
Copy link

hus787 commented Mar 5, 2020

had to use the following to fix the problem

go get -v github.com/rogpeppe/godef@master

@hyangah
Copy link
Contributor

hyangah commented Mar 17, 2020

v1.1.2 is released. Thanks @rogpeppe !

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

Successfully merging a pull request may close this issue.

3 participants