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

Does not support modules yet #35

Open
fgm opened this issue Jan 7, 2019 · 5 comments
Open

Does not support modules yet #35

fgm opened this issue Jan 7, 2019 · 5 comments

Comments

@fgm
Copy link

fgm commented Jan 7, 2019

Although the command will start parsing dependencies, it fails at finding the imports in the modules cache, instead relying only on GOPATH/GOROOT.

@schweigert
Copy link

Yes, it does!

godepgraph -nostdlib -horizontal ./cmd/server | dot -Tpng -o godepgraph.png

@bwplotka
Copy link

bwplotka commented Apr 9, 2020

Please update the README! I spent 20m to fight with this tool, until I found this ):

@bwplotka
Copy link

bwplotka commented Apr 9, 2020

Actually it does not support Go modules:

➜  prometheus git:(master) ✗ godepgraph -nostdlib -horizontal ./cmd/prometheus
2020/04/09 12:13:42 failed to import github.com/jpillora/backoff (imported at level 3 by github.com/mwitkow/go-conntrack):
cannot find package "github.com/jpillora/backoff" in any of:
	/home/bwplotka/.gvm/gos/go1.13.1/src/github.com/jpillora/backoff (from $GOROOT)
	/home/bwplotka/Repos/prometheusgopath/src/github.com/jpillora/backoff (from $GOPATH)
go version
go version go1.13.1 **linux/amd64**
/pkg/mod/github.com/kisielk/godepgraph@v0.0.0-20190626013829-57a7e4a651a9/

@mvdan
Copy link

mvdan commented Dec 16, 2020

For those of you searching "go package graph" and hitting a wall with this tool not supporting modules, you might want to follow Helcaraxan/gomod#71. cc @Helcaraxan

@Helcaraxan
Copy link

Just to update after @mvdan's message that github.com/Helcaraxan/gomod now supports querying and visualising both the module and package dependency graphs of a given Go module since the v0.6.0 release that happened earlier today.

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

5 participants