arp242 / goatcounter

Easy web analytics. No tracking of personal data.
https://www.goatcounter.com
Other
4.45k stars 179 forks source link

replace statements in go.mod make it impossible to use as a package #767

Open maruel opened 1 week ago

maruel commented 1 week ago

At the time of writing, https://github.com/arp242/goatcounter/blob/master/go.mod contains 3 replace statements:

These make the project impossible to import zgo.at/goatcounter/v2 as package.

arp242 commented 1 week ago
% go install zgo.at/goatcounter/v2/cmd/goatcounter@latest
go: zgo.at/goatcounter/v2/cmd/goatcounter@latest (in zgo.at/goatcounter/v2@v2.5.0):
        The go.mod file for the module providing named packages contains one or
        more replace directives. It must not contain directives that would cause
        it to be interpreted differently than if it were the main module.

This seems to be new; pretty sure this worked at some point.

Not entirely sure what the solution is here 🤔

maruel commented 1 week ago

The solution is to get rid of the replace statements. For zgo.at/bgrun, either creating the repository or reverting back to local (I'd recommend the later).

For the two others, figure out how to get https://github.com/oschwald/geoip2-golang/pull/68 and https://github.com/oschwald/maxminddb-golang/pull/75 in or to do a real fork for these two repositories.