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

failing on install #6

Closed
ghost opened this issue May 14, 2018 · 27 comments
Closed

failing on install #6

ghost opened this issue May 14, 2018 · 27 comments

Comments

@ghost
Copy link

ghost commented May 14, 2018

Ran from the normal "Go:Install/Update tools"

my env:

x-MacBook-Pro:~ apple$ code -v
1.23.1
d0182c3417d225529c6d5ad24b7572815d0de9ac
x64


x-MacBook-Pro:~ apple$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/apple/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/apple/workspace/go"
GORACE=""
GOROOT="/usr/local/opt/go/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/go-build450578454=/tmp/go-build -gno-record-gcc-switches -fno-common"
x-MacBook-Pro:~ apple$ 

output:

Installing 15 tools at /Users/apple/workspace/go/bin
  gocode
  gopkgs
  go-outline
  go-symbols
  guru
  gorename
  gomodifytags
  goplay
  impl
  fillstruct
  godef
  godoc
  goreturns
  golint
  gotests

Installing github.com/nsf/gocode SUCCEEDED
Installing github.com/uudashr/gopkgs/cmd/gopkgs FAILED
Installing github.com/ramya-rao-a/go-outline SUCCEEDED
Installing github.com/acroca/go-symbols SUCCEEDED
Installing golang.org/x/tools/cmd/guru SUCCEEDED
Installing golang.org/x/tools/cmd/gorename SUCCEEDED
Installing github.com/fatih/gomodifytags SUCCEEDED
Installing github.com/haya14busa/goplay/cmd/goplay SUCCEEDED
Installing github.com/josharian/impl SUCCEEDED
Installing github.com/davidrjenni/reftools/cmd/fillstruct SUCCEEDED
Installing github.com/rogpeppe/godef SUCCEEDED
Installing golang.org/x/tools/cmd/godoc SUCCEEDED
Installing github.com/sqs/goreturns SUCCEEDED
Installing github.com/golang/lint/golint SUCCEEDED
Installing github.com/cweill/gotests/... SUCCEEDED

1 tools failed to install.

gopkgs:
Error: Command failed: /usr/local/opt/go/libexec/bin/go get -u -v github.com/uudashr/gopkgs/cmd/gopkgs
github.com/uudashr/gopkgs (download)
github.com/karrick/godirwalk (download)
github.com/pkg/errors (download)
# cd /Users/apple/workspace/go/src/github.com/pkg/errors; git pull --ff-only
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

package github.com/pkg/errors: exit status 1
github.com/uudashr/gopkgs (download)
github.com/karrick/godirwalk (download)
github.com/pkg/errors (download)
# cd /Users/apple/workspace/go/src/github.com/pkg/errors; git pull --ff-only
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

package github.com/pkg/errors: exit status 1

@uudashr
Copy link
Owner

uudashr commented May 14, 2018

And that so weird.

Retry please... I want to know if it consistent or not.

Or try to delete the /Users/apple/workspace/go/src/github.com/pkg/errors seems the git reference are missing.

@dobegor
Copy link

dobegor commented May 14, 2018

I can confirm I have problems with VSCode:
Could not find packages. Ensure `gopkgs -format {{.Name}};{{.ImportPath}}` runs successfully.
Though it's installed in the same place as all other tools.

@uudashr
Copy link
Owner

uudashr commented May 14, 2018

@dobegor what is the result gopkgs -help?
It should looks like

Usage of gopkgs:
  -format string
    	custom output format (default "{{.ImportPath}}")
  -help
    	show this message
  -no-vendor
    	exclude vendor dependencies except under workDir (if specified)
  -workDir string
    	importable packages only for workDir


Use -format to custom the output using template syntax. The struct being passed to template is:
    type Pkg struct {
        Dir        string // directory containing package sources
        ImportPath string // import path of package in dir
        Name       string // package name
    }

Use -workDir={path} to speed up the package search. This will ignore any vendor package outside the package root.

@dobegor
Copy link

dobegor commented May 14, 2018

@uudashr
it's a bit different:

Usage of gopkgs:
  -format string
    	custom output format (default "{{.ImportPath}}")
  -help
    	show this message
  -workDir string
    	importable packages only for workDir


Use -format to custom the output using template syntax. The struct being passed to template is:
    type Pkg struct {
        Dir        string // directory containing package sources
        ImportPath string // import path of package in dir
        Name       string // package name
    }

Use -workDir={path} to speed up the package search. This will ignore any vendor package outside the workDir.```

@dobegor
Copy link

dobegor commented May 14, 2018

I just tried to update and got:

$ go get -u -v github.com/uudashr/gopkgs/cmd/gopkgs
github.com/uudashr/gopkgs (download)
unexpected directory layout:
	import path: github.com/karrick/godirwalk
	root: /Users/dobegor/go/src
	dir: /Users/dobegor/go/src/github.com/uudashr/gopkgs/vendor/github.com/karrick/godirwalk
	expand root: /Users/dobegor/go/src
	expand dir: /Users/dobegor/go/src/github.com/uudashr/gopkgs/vendor/github.com/karrick/godirwalk
	separator: /```

@uudashr
Copy link
Owner

uudashr commented May 14, 2018

what is your go version? go version

@dobegor
Copy link

dobegor commented May 14, 2018

$ go version
go version go1.10.1 darwin/amd64

@uudashr
Copy link
Owner

uudashr commented May 15, 2018

It seems there is an issue that hasn't been solved golang/go#21057
@dobegor try another attempt, that should fixed the problem. Please tell me the result.

@sudo-suhas
Copy link

I got a very similar error just now when I tried to update the Go tools from VSCode. Then I ran the following and it worked correctly:

GOPATH=~/installs/go-tools go get -u -v github.com/uudashr/gopkgs/cmd/gopkgs
github.com/uudashr/gopkgs (download)
github.com/uudashr/gopkgs/vendor/github.com/pkg/errors
github.com/uudashr/gopkgs/vendor/github.com/karrick/godirwalk
github.com/uudashr/gopkgs
github.com/uudashr/gopkgs/cmd/gopkgs

Not sure what's happening here. Now, even the VSCode tools update succeeds.

@ghost
Copy link
Author

ghost commented May 15, 2018 via email

@uudashr
Copy link
Owner

uudashr commented May 15, 2018

FYI it's an issue on the golang that hasn't been solved golang/go#21057

In the future, I might remove the vendor directory on the gopkgs soon the PR merged karrick/godirwalk#4.

Seems the vendor directory caused the issue.

@dobegor
Copy link

dobegor commented May 15, 2018

@uudashr I do know that issue. The problem I'm talking about is that VSCode is complaining:
Could not find packages. Ensure `gopkgs -format {{.Name}};{{.ImportPath}}` runs successfully.
And import completion doesn't work at all due to this.

I already updated gopkgs successfully.

@uudashr
Copy link
Owner

uudashr commented May 15, 2018

@dobegor try to execute gopkgs -format {{.Name}};{{.ImportPath}} on your console. Is there any result?

@dobegor
Copy link

dobegor commented May 15, 2018

@uudashr

$ gopkgs -format '{{.Name}};{{.ImportPath}}'
cannot Stat: stat /home/dobegor/go/src/github.com/g3n/g3nd/data/images/list-add.png: no such file or directory```

@uudashr
Copy link
Owner

uudashr commented May 15, 2018

Update the gopkgs, the latest version should tackle the issues.

@dobegor
Copy link

dobegor commented May 15, 2018

@uudashr
Just did an update (go get -u -v github.com/uudashr/gopkgs/cmd/gopkgs) and the issue persists for me (with same output running that command manually complaining about that png file).

Have you by any chance had forgot to push the changes? Latest commit > 6 hours ago, I did my previous test after that commit.

@uudashr
Copy link
Owner

uudashr commented May 15, 2018

I see github.com/g3n/g3nd/blob/master/data/images/add.png is link to list-add.png which not exists.

@dobegor
Copy link

dobegor commented May 15, 2018

@uudashr yes, thank you, will fix that. But perhaps gopkgs can ignore files not ending in .go and skip them?

@uudashr
Copy link
Owner

uudashr commented May 15, 2018

Already ignore. The issue is on the https://github.com/karrick/godirwalk.
Ya... let see what I can do.

@dobegor
Copy link

dobegor commented May 15, 2018

Thanks!

@uudashr
Copy link
Owner

uudashr commented May 16, 2018

You are welcome

@uudashr
Copy link
Owner

uudashr commented May 16, 2018

I'll close the issue since it solved.

@vickylance
Copy link

@uudashr This issue is definitely not resolved. I just opened VSCode and installed go extension for the first time and I got the above error while installing gopkgs

@iamfarazansar
Copy link

@uudashr i am also facing the same issue....

@iamfarazansar
Copy link

iamfarazansar commented Feb 16, 2020

@uudashr This issue is definitely not resolved. I just opened VSCode and installed go extension for the first time and I got the above error while installing gopkgs

@vickylance If you get any solution then please reply....

@gcantieni
Copy link

Maybe it's a recent change since I am also getting this issue in vscode now but the thread has been dormant for more than a year

@uudashr
Copy link
Owner

uudashr commented Feb 17, 2020

Been discussed in #25

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

6 participants