On Tue, Jan 05, 2021 at 07:18:20AM -0700, Aaron Bieber wrote: > This teaches portgen and go.port.mk how to handle module URLs that > contain uppercase characters. > > Go has chosen to translate module names like > 'github.com/poolpOrg/filter-rspamd' to > 'github.com/ploop!org/filter-rspamd'. Your typo here ("ploop" instead of "poolp") made think for a second that go folks *reversed* strings...
> They had reasons: > > > To avoid ambiguity when serving from case-insensitive file systems, > > the $module and $version elements are case-encoded by replacing > > every uppercase letter with an exclamation mark followed by the > > corresponding lower-case letter. This allows modules example.com/M > > and example.com/m to both be stored on disk, since the former is > > encoded as example.com/!m. > > Because of the need for escaping, a port like that looks like the one > below would not work: > MODGO_MODNAME = github.com/poolpOrg/filter-rspamd > MODGO_VERSION = v0.1.7 > > Same goes for `portgen go github.com/poolpOrg/filter-rspamd` - this > errors because it can't find the distfile. > > The make magic is from espie@ / naddy@ - I am not clever enough to come > up with such voodoo myself! :D That reads fine. OK kn > I have tested a handful of existing MODGO_ ports with this diff, as well > as existing and new ports that were built with 'portgen go'. I have not done any extra tests.