Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

unable to add new golang dependency with godep #32

Closed
MalloZup opened this issue Mar 26, 2019 · 6 comments
Closed

unable to add new golang dependency with godep #32

MalloZup opened this issue Mar 26, 2019 · 6 comments

Comments

@MalloZup
Copy link
Contributor

MalloZup commented Mar 26, 2019

How to reproduce

echo $GOPATH
/home/dmaiocchi/go

~/go/src/github.com/suse.com/caaspctl> dep ensure -add MYPKG

produce

The following errors occurred while deducing packages:
  * "suse.com/caaspctl/internal/app/caaspctl/cluster": unable to deduce repository and source type for "suse.com/caaspctl/internal/app/caaspctl": unable to read metadata: unable to parse go-import metadata: XML syntax error on line 62: expected element name after <
  * "suse.com/caaspctl/internal/pkg/caaspctl/deployments/ssh/assets": unable to deduce repository and source type for "suse.com/caaspctl/internal/pkg/caaspctl/deployments/ssh": unable to read metadata: unable to parse go-import metadata: XML syntax error on line 62: expected element name after <
  * "suse.com/caaspctl/internal/pkg/caaspctl/deployments": unable to deduce repository and source type for "suse.com/caaspctl/internal/pkg/caaspctl/deployments": unable to read metadata: unable to parse go-import metadata: XML syntax error on line 62: expected element name after <
  * "suse.com/caaspctl/pkg/caaspctl/actions/node/join": unable to deduce repository and source type for "suse.com/caaspctl/pkg/caaspctl": unable to read metadata: unable to parse go-import metadata: XML syntax error on line 62: expected element name after <
  * "suse.com/caaspctl/internal/pkg/caaspctl/kubeadm": unable to deduce repository and source type for "suse.com/caaspctl/internal/pkg/caaspctl/kubeadm": unable to read metadata: unable to parse go-import metadata: XML syntax error on line 62: expected element name after <
  * "suse.com/caaspctl/internal/app/caaspctl": unable to deduce repository and source type for "suse.com/caaspctl/internal/app/caaspctl": unable to read metadata: unable to parse go-import metadata: XML syntax error on line 62: expected element name after <
  * "suse.com/caaspctl/internal/app/caaspctl/node": unable to deduce repository and source type for "suse.com/caaspctl/internal/app/caaspctl": unable to read metadata: unable to parse go-import metadata: XML syntax error on line 62: expected element name after <
  * "suse.com/caaspctl/internal/pkg/caaspctl/kubernetes": unable to deduce repository and source type for "suse.com/caaspctl/internal/pkg/caaspctl/kubernetes": unable to read metadata: unable to parse go-import metadata: XML syntax error on line 62: expected element name after <
  * "suse.com/caaspctl/internal/pkg/caaspctl/deployments/ssh": unable to deduce repository and source type for "suse.com/caaspctl/internal/pkg/caaspctl/deployments/ssh": unable to read metadata: unable to parse go-import metadata: XML syntax error on line 62: expected element name after <
  * "suse.com/caaspctl/internal/pkg/caaspctl/etcd": unable to deduce repository and source type for "suse.com/caaspctl/internal/pkg/caaspctl/etcd": unable to read metadata: unable to parse go-import metadata: XML syntax error on line 62: expected element name after <
  * "suse.com/caaspctl/pkg/caaspctl/actions/cluster/init": unable to deduce repository and source type for "suse.com/caaspctl/pkg/caaspctl": unable to read metadata: unable to parse go-import metadata: XML syntax error on line 62: expected element name after <
  * "suse.com/caaspctl/pkg/caaspctl/actions/node/remove": unable to deduce repository and source type for "suse.com/caaspctl/pkg/caaspctl/actions/node/remove": unable to read metadata: unable to parse go-import metadata: XML syntax error on line 62: expected element name after <
  * "suse.com/caaspctl/pkg/caaspctl": unable to deduce repository and source type for "suse.com/caaspctl/pkg/caaspctl": unable to read metadata: unable to parse go-import metadata: XML syntax error on line 62: expected element name after <
  * "suse.com/caaspctl/pkg/caaspctl/actions/node/bootstrap": unable to deduce repository and source type for "suse.com/caaspctl/pkg/caaspctl": unable to read metadata: unable to parse go-import metadata: XML syntax error on line 62: expected element name after <
  * "suse.com/caaspctl/pkg/caaspctl/actions/cluster/status": unable to deduce repository and source type for "suse.com/caaspctl/pkg/caaspctl": unable to read metadata: unable to parse go-import metadata: XML syntax error on line 62: expected element name after <

To me it seems that something is wrong in our devel pkging golang src, since i have used go dep in other projects but never had this error

@MalloZup
Copy link
Contributor Author

it could be related to the fact we are in private repo in github. investigating

@MalloZup MalloZup changed the title unable to add golang dependency with godep unable to add new golang dependency with godep Mar 26, 2019
@kravciak
Copy link
Contributor

kravciak commented Mar 26, 2019

You have: ~/go/src/github.com/suse.com/caaspctl
You should have: ~/go/src/suse.com/caaspctl
Reopen if that does not help..

@MalloZup
Copy link
Contributor Author

MalloZup commented Mar 26, 2019

@kravciak yop thx. indeed it helped partially. 👍 (i'm having other issue, see later)

allthough i don't think we need to close this issue, since;
suse.com is more java then golang
and at least we might add a devel.doc before closing this, because this isn't standard go workflow of things.

As golang user i would do go get -u repo but our repo is private.

  1. We should at least document this for devel workflow.
    • saying to clone with git clone and then create a dir called suse.com ( this is not what a gopher does in normal ways) . (either using modules or using go get)
  2. the 2nd issue i'm having
go/src/suse.com/caaspctl> dep ensure -add github.com/onsi/ginkgo
Fetching sources...

panic: version queue is empty, should not happen

goroutine 1 [running]:
github.com/golang/dep/gps.(*solver).findValidVersion(0xc4200ec100, 0xc4203baaa0, 0xc420342540, 0x1, 0x1, 0x0, 0xc420342540)
	/Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:915 +0x4d7
github.com/golang/dep/gps.(*solver).createVersionQueue(0xc4200ec100, 0xc42028f841, 0x14, 0x0, 0x0, 0xc420342540, 0x1, 0x1, 0x0, 0x0, ...)
	/Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:902 +0x80d
github.com/golang/dep/gps.(*solver).solve(0xc4200ec100, 0x9f5960, 0xc4200ae1d0, 0x7949f3, 0x8ff8e0, 0xc42040a180)
	/Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:505 +0x5b7
github.com/golang/dep/gps.(*solver).Solve(0xc4200ec100, 0x9f5960, 0xc4200ae1d0, 0xc70408, 0xc4200280db, 0x11, 0xc4203806c0)
	/Users/travis/gopath/src/github.com/golang/dep/gps/solver.go:440 +0xc8
main.(*ensureCommand).runAdd(0xc4201a3926, 0xc4200ca980, 0xc4200b53f0, 0x1, 0x1, 0xc4200f0090, 0x9f9900, 0xc420346060, 0xc4200280c4, 0x28, ...)
	/Users/travis/gopath/src/github.com/golang/dep/cmd/dep/ensure.go:587 +0xa65
main.(*ensureCommand).Run(0xc4201a3926, 0xc4200ca980, 0xc4200b53f0, 0x1, 0x1, 0x0, 0x0)
	/Users/travis/gopath/src/github.com/golang/dep/cmd/dep/ensure.go:214 +0x921
main.(*Config).Run(0xc4200b6f60, 0x0)
	/Users/travis/gopath/src/github.com/golang/dep/cmd/dep/main.go:212 +0xfae
main.main()
	/Users/travis/gopath/src/github.com/golang/dep/cmd/dep/main.go:84 +0x54d

@MalloZup MalloZup reopened this Mar 26, 2019
@ereslibre
Copy link
Contributor

We should at least document this for devel workflow.

This is documented here: https://github.com/SUSE/caaspctl#installation

@ereslibre
Copy link
Contributor

the 2nd issue i'm having

You are hitting onsi/ginkgo#513

@MalloZup
Copy link
Contributor Author

ok thx @kravciak @ereslibre .. so yeah bad luck for me with that, since the dep i was adding as a bug.. :(

ok thx for any pointers. closing

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

No branches or pull requests

3 participants