"Juris M." <[email protected]> writes:
> Hello, ports@! > > I'm trying to create a port of hydroxide[1], which is written in Go. > My knowledge of Go lang project infrastructure is minimal and the ports > infrastructure is new to me as well. > > So far, I've looked at other ports in Go as examples, mainly terraform, and > some key elements are still unclear to me, whether related to the ports > infrastructure or Go specifically. > > 1) How do I determine the exhaustive list of dependency modules for > MODGO_MODULES. Are those listed in the projects go.mod enough? The list is produced from the output of `go mod graph`. You can see the code that builds the list here: https://github.com/openbsd/ports/blob/master/infrastructure/lib/OpenBSD/PortGen/Port/Go.pm#L162-L191 As for generating the list, if you set MODGO_MODNAME (this is always the "module" line from a projects go.mod file) and MODGO_VERSION (the latest semver tag for a project) you can run "make modgo-gen-modules" to produce the needed MODGO lines. I always do: make modgo-gen-modules > modules.inc Because the list is usually long. > 2) What are MODGO_MODFILES, and why do they list multiple versions? Are they > the exhaustive versions of the dependencies of the dependencies of the main > project? Mod files are used by Go for dependency resolution. It needs multiple versions as part of this. > > Those are the main two questions I have for now. Any pointers addressing > these will be appreciated. > > So far, I've been running a locally built hydroxide, and it's been working > fantastically. > > I would like to contribute this and maintain it, if no one objects, as I've > found it useful and hope others will too. > > [1]: Hydroxide is a CardDAV, IMAP and SMTP bridge for ProtonMail[2] > [2]: https://protonmail.com/
