Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
maruel opened this issue Sep 23, 2024 · 2 comments
Open

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

maruel opened this issue Sep 23, 2024 · 2 comments

Comments

@maruel
Copy link

maruel commented Sep 23, 2024

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

  • zgo.at/bgrun added in c5810c6
  • github.com/oschwald/maxminddb-golang and github.com/oschwald/geoip2-golang added a long time ago.

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

@arp242
Copy link
Owner

arp242 commented Sep 23, 2024

% go install zgo.at/goatcounter/v2/cmd/goatcounter@latest
go: zgo.at/goatcounter/v2/cmd/goatcounter@latest (in zgo.at/goatcounter/[email protected]):
        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
Copy link
Author

maruel commented Sep 23, 2024

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 oschwald/geoip2-golang#68 and oschwald/maxminddb-golang#75 in or to do a real fork for these two repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants