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

Error when running go install github.com/DarthSim/overmind/v2@latest w/in a repo that uses it. #177

Closed
jasondborneman opened this issue Mar 25, 2024 · 2 comments

Comments

@jasondborneman
Copy link

jasondborneman commented Mar 25, 2024

Our repo has a /setup script that installs requirements, one of which is overmind (go install github.com/DarthSim/overmind/v2@latest). It runs this within our repo. This worked fine until the replace directive was added into overmind's go.mod: https://github.com/DarthSim/overmind/blob/master/go.mod#L20

Now when trying to run our setup it bombs out when reaching the overmind install step with the following error:

go: github.com/DarthSim/overmind/v2@latest (in github.com/DarthSim/overmind/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.

In fact, I tried running go install github.com/DarthSim/overmind/v2@latest even outside our repo and still get that same error.

We are on go version 1.22.1, btw

@jasondborneman jasondborneman changed the title Error when running go install github.com/vektra/mockery/v2@latest w/in a repo that uses it. Error when running go install github.com/DarthSim/overmind/v2@latest w/in a repo that uses it. Mar 25, 2024
@Envek Envek closed this as completed in 7787d5c Mar 26, 2024
Envek added a commit that referenced this issue Mar 26, 2024
@Envek
Copy link
Collaborator

Envek commented Mar 26, 2024

This golang limitation is freaking me out: golang/go#44840

But anyway, removed replace directive and tagged 2.5.1 so it should work now, thanks for reporting.

@jasondborneman
Copy link
Author

This golang limitation is freaking me out: golang/go#44840

But anyway, removed replace directive and tagged 2.5.1 so it should work now, thanks for reporting.

Can confirm this fixed our issue. Thanks! 🎉

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