New use of vgo - how to show all dependancies?

Hi all,

I’ve been using Hugo since around v0.15, I liked it so much that for v0.16 I created the Port for FreeBSD and have maintained it ever since - this makes it easy for FreeBSD users to compile Hugo using the Ports collection or install the binary via pkg(8).

With the recent move to vgo, I am unsure how I can successfully list all of the required dependancies for Hugo.
The FreeBSD Ports system uses a tree of Makefiles. Port dependancies need to be listed in the Makefile so that the Ports framework can fetch known dependancies. Nothing is allowed to be fetched ‘dynamically’, everything must be specified.

I’ve written a script that does a go mod graph in the Hugo source tarball, but this doesn’t include all of the dependancies of the dependancies…

Is there a way to generate a full list of the dependancies along with the information found in the go.mod file?
This file doesn’t include dependancies of dependancies - I presume that go(1) automatically calculates this while fetching.

I love using Hugo, and would like to continue providing FreeBSD users a native method to install it.

Many thanks for any help,
Ben

1 Like
go list -m all

Should be complete. But note that this will also include test dependencies.

2 Likes

Ah ha! That is exactly what I was looking for.

Many thanks, @bep!

Ben