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

godep save fails #1700

Closed
kidlj opened this issue Dec 16, 2018 · 3 comments
Closed

godep save fails #1700

kidlj opened this issue Dec 16, 2018 · 3 comments
Labels
Milestone

Comments

@kidlj
Copy link

kidlj commented Dec 16, 2018

  • go version:
    go version go1.11.2 windows/amd64
  • gin version (or commit ref):
    $ go get github.com/gin-gonic/gin
  • operating system:
    Windows 10

Description

godep save fails due to blank imports packages in tools.go not available in GOPATH

Screenshots

mellon@collie MINGW64 /d/testgin/src/testgin
$ go env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\mellon\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=D:/testgin/
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\mellon\AppData\Local\Temp\go-build602265990=/tmp/go-build -gno-record-gcc-switches

mellon@collie MINGW64 /d/testgin/src/testgin
$ ls
main.go

mellon@collie MINGW64 /d/testgin/src/testgin
$ godep save
godep: Package (github.com/campoy/embedmd) not found

@thinkerou
Copy link
Member

@kidlj please retry again, thanks!

@kidlj
Copy link
Author

kidlj commented Dec 26, 2018

Hi, @thinkerou

After upgrading gin to the latest commit, godep save . puts another err:

The original issue caused by blank imports in tools.go:

mellon@collie MINGW64 /d/testgin/src/testgin
$ godep save
godep: Package (github.com/campoy/embedmd) not found

After upgrading gin to the latest commit, it reports:

mellon@collie MINGW64 /d/testgin/src/testgin
$ go get -u github.com/gin-gonic/gin

mellon@collie MINGW64 /d/testgin/src/testgin
$ godep save .
godep: Package (github.com/json-iterator/go) not found

mellon@collie MINGW64 /d/testgin/src/testgin
$ go env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\mellon\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=D:/testgin/
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\mellon\AppData\Local\Temp\go-build624604198=/tmp/go-build -gno-record-gcc-switches

Don't know why. By the way, I quit using godep save and am using go mod vendor for my projects.

@thinkerou thinkerou reopened this Dec 26, 2018
@appleboy appleboy added the bug label Dec 29, 2018
@appleboy appleboy added this to the 1.4 milestone Dec 29, 2018
appleboy pushed a commit that referenced this issue Jan 25, 2019
#1604 #1566 #1700 #1737 

because some dependencies only are used on example i.e. grpc.

Or migrate `examples` to gin-gonic/examples`?
@thinkerou
Copy link
Member

@kidlj have removed tools.go package and add exculde at go.mod file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants