Thursday, June 25, 2020

Re: MODGO_MODULES generator helper.

Paco Esteban writes:

> Hi ports@,
>
> I had the idea of having a make target to help with MODGO_MODULES and
> MODGO_MODFILES generation just like devel/cargo does with its
> modcargo-gen-crates.
>
> It may be a bit crude but it works and it could be quite useful when
> updating ports that use this.
>
> I discussed it a bit with abieber@ (as it's based on his portgen go work).
> He liked the general idea, and we agreed to continue on the list.

IMO this will be a nice addition. I am not sure if adding it to
infrastructure/bin is correct, but it seems logical to me!

>
> Not sure if I should use ${REPORT_PROBLEM} instead of that `exit 1`.
> Of course this should be
>
> Comments appreciated.
>
> Attached 2 diffs, one against ports for the helper and make target and
> one against src for the man page changes.

Assuming the bin location is appropriate, OK abieber@!

>
> Cheers,

Expanding on this a bit, here is a diff to Go.pm that allows one to
specify the version (non-versioned will grab what ever the latest is
still):

portgen go suah.dev/ogvt@v1.0.2
- or -
portgen go suah.dev/ogvt@v1.0.3

This will let existing ports spit out the proper MOGGO_MOD*
values. Without this the portgen logic will assume you want the latest
version of whatever app you are using which might not align with the
current version of a given port.

Alternatively we could output MODGO_VERSION var alongside the MODGO_MOD*
stuff.

No comments:

Post a Comment