mailgun / godebug

DEPRECATED! https://github.com/derekparker/delve

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Godebug does not work with vendoring

hareesh-blippar opened this issue · comments

Go 1.6 has moved to vendoring for managing dependencies. However, godebug does not build when the package has vendored dependancies.

Here is the type of error message shown:
In godebug_tmp_folder/github.com/my_working_dir/my_repo/my_file.go
cannot use "github.com/popular_user/popular_lib".Fields
literal (type "github.com/popular_user/popular_lib".Fields)
as type "github.com/my_working_dir/my_repo/vendor/github.com/popular_user/popular_lib"

I also have this issue

Try running $ go get . in the main project folder as a workaround.

➜  github.com tree | grep meowssir -A2
├── meowssir
│   └── main
│       └── main.go

I've opened issue #88 for a related (but different) item. Unfortunately, @meowssir suggestion does not work for #88.

Believe the issue is that the file loader.go (_workspace/src/golang.org/x/tools/loader/loagergo) does not support vendoring. it needs to be enhanced add the vendored directories to ImportPath

I have the same issue:

cgo failed: [go tool cgo -objdir /tmp/net_C303750830 -- -I /tmp/net_C303750830 cgo_linux.go cgo_resnew.go cgo_socknew.go cgo_unix.go]: exit status 1
/usr/local/go/src/net/lookup_unix.go:58:24: undeclared name: cgoLookupHost
/usr/local/go/src/net/lookup_unix.go:70:24: undeclared name: cgoLookupIP
/usr/local/go/src/net/lookup_unix.go:86:23: undeclared name: cgoLookupPort
/usr/local/go/src/net/lookup_unix.go:95:24: undeclared name: cgoLookupCNAME
/usr/local/go/src/net/lookup_unix.go:162:23: undeclared name: cgoLookupPTR
/usr/local/go/src/net/http/h2_bundle.go:45:2: could not import golang_org/x/net/http2/hpack (cannot find package "golang_org/x/net/http2/hpack" in any of:
	/usr/local/go/src/golang_org/x/net/http2/hpack (from $GOROOT)
	/go/vendor/src/golang_org/x/net/http2/hpack (from $GOPATH)
	/go/src/golang_org/x/net/http2/hpack)
/usr/local/go/src/net/http/h2_bundle.go:46:2: could not import golang_org/x/net/lex/httplex (cannot find package "golang_org/x/net/lex/httplex" in any of:
	/usr/local/go/src/golang_org/x/net/lex/httplex (from $GOROOT)
	/go/vendor/src/golang_org/x/net/lex/httplex (from $GOPATH)
	/go/src/golang_org/x/net/lex/httplex)
/usr/local/go/src/net/http/http.go:10:2: could not import golang_org/x/net/lex/httplex (cannot find package "golang_org/x/net/lex/httplex" in any of:
	/usr/local/go/src/golang_org/x/net/lex/httplex (from $GOROOT)
	/go/vendor/src/golang_org/x/net/lex/httplex (from $GOPATH)
	/go/src/golang_org/x/net/lex/httplex)
/usr/local/go/src/net/http/server.go:31:2: could not import golang_org/x/net/lex/httplex (cannot find package "golang_org/x/net/lex/httplex" in any of:
	/usr/local/go/src/golang_org/x/net/lex/httplex (from $GOROOT)
	/go/vendor/src/golang_org/x/net/lex/httplex (from $GOPATH)
	/go/src/golang_org/x/net/lex/httplex)
/usr/local/go/src/net/http/transfer.go:21:2: could not import golang_org/x/net/lex/httplex (cannot find package "golang_org/x/net/lex/httplex" in any of:
	/usr/local/go/src/golang_org/x/net/lex/httplex (from $GOROOT)
	/go/vendor/src/golang_org/x/net/lex/httplex (from $GOPATH)
	/go/src/golang_org/x/net/lex/httplex)
/usr/local/go/src/net/http/transport.go:30:2: could not import golang_org/x/net/lex/httplex (cannot find package "golang_org/x/net/lex/httplex" in any of:
	/usr/local/go/src/golang_org/x/net/lex/httplex (from $GOROOT)
	/go/vendor/src/golang_org/x/net/lex/httplex (from $GOPATH)
	/go/src/golang_org/x/net/lex/httplex)
/usr/local/go/src/net/http/h2_bundle.go:848:19: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:1827:11: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:1851:52: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:1862:51: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:5020:11: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:6722:20: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:3131:18: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:3187:46: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:6821:22: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:6913:30: undeclared name: hpack
/usr/local/go/src/net/http/transport.go:323:8: undeclared name: httplex
/usr/local/go/src/net/http/transport.go:327:9: undeclared name: httplex
/usr/local/go/src/net/http/h2_bundle.go:5287:26: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:5290:12: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:6646:4: undeclared name: httplex
/usr/local/go/src/net/http/h2_bundle.go:1920:2: invalid operation: hdec (variable of type *invalid type) has no field or method SetEmitEnabled
/usr/local/go/src/net/http/h2_bundle.go:1921:2: invalid operation: hdec (variable of type *invalid type) has no field or method SetMaxStringLength
/usr/local/go/src/net/http/h2_bundle.go:1922:2: invalid operation: hdec (variable of type *invalid type) has no field or method SetEmitFunc
/usr/local/go/src/net/http/h2_bundle.go:1922:27: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:1926:7: undeclared name: httplex
/usr/local/go/src/net/http/h2_bundle.go:1942:4: invalid operation: hdec (variable of type *invalid type) has no field or method SetEmitEnabled
/usr/local/go/src/net/http/h2_bundle.go:1948:4: invalid operation: hdec (variable of type *invalid type) has no field or method SetEmitEnabled
/usr/local/go/src/net/http/h2_bundle.go:1957:8: invalid operation: hdec (variable of type *invalid type) has no field or method SetEmitFunc
/usr/local/go/src/net/http/h2_bundle.go:1957:33: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:1962:16: invalid operation: hdec (variable of type *invalid type) has no field or method Write
/usr/local/go/src/net/http/h2_bundle.go:1979:12: invalid operation: hdec (variable of type *invalid type) has no field or method Close
/usr/local/go/src/net/http/h2_bundle.go:5784:7: undeclared name: httplex
/usr/local/go/src/net/http/h2_bundle.go:5788:8: undeclared name: httplex
/usr/local/go/src/net/http/h2_bundle.go:5879:2: invalid operation: cc.henc (variable of type *invalid type) has no field or method WriteField
/usr/local/go/src/net/http/h2_bundle.go:5879:21: undeclared name: hpack
/usr/local/go/src/net/http/server.go:789:25: undeclared name: httplex
/usr/local/go/src/net/http/server.go:793:7: undeclared name: httplex
/usr/local/go/src/net/http/server.go:797:8: undeclared name: httplex
/usr/local/go/src/net/http/h2_bundle.go:2517:7: undeclared name: httplex
/usr/local/go/src/net/http/h2_bundle.go:3042:20: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:3045:23: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:3899:3: invalid operation: sc.hpackEncoder (variable of type *invalid type) has no field or method SetMaxDynamicTableSize
/usr/local/go/src/net/http/h2_bundle.go:6698:22: undeclared name: httplex
/usr/local/go/src/net/http/h2_bundle.go:6825:2: invalid operation: enc (variable of type *invalid type) has no field or method WriteField
/usr/local/go/src/net/http/h2_bundle.go:6825:17: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:6929:8: undeclared name: httplex
/usr/local/go/src/net/http/http.go:42:10: undeclared name: httplex
/usr/local/go/src/net/http/transfer.go:566:14: undeclared name: httplex
/usr/local/go/src/net/http/transfer.go:568:23: undeclared name: httplex
couldn't load packages due to errors: net, net/http

after the workaround: "go get ."

godebug run

runs but does not debug my go files