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

Go install fails (directives to be interpreted differently than if it were the main module) #261

Closed
floyd-fuh opened this issue Feb 27, 2024 · 6 comments

Comments

@floyd-fuh
Copy link

% go version          
go version go1.22.0 darwin/amd64
% go install github.com/coreruleset/go-ftw@latest
go: github.com/coreruleset/go-ftw@latest (in github.com/coreruleset/go-ftw@v0.6.4):
	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.

Maybe see also linuxkit/linuxkit#3873 for a similar issue.

Your README says this should work.

@theseion
Copy link
Collaborator

Thanks for the report @floyd-fuh. It did work until we added a replace directive in 0.6.4 :) We'll investigate.

@theseion
Copy link
Collaborator

Wow... the behavior of go install really sucks here, even though can appreciate the technical reasons. Honestly, I think the easiest thing to do is to update the documentation. I don't see how we could get around this issue, since we need the replace directive at least until the next release. @fzipi?

@fzipi360
Copy link

Until the next release of go-ftw? Or the dependency?

@theseion
Copy link
Collaborator

TBH, I don't fully recall the reason for why we had to add the replace directive. I think it was because Coraza copies the contents of our go.mod and then had a dependency clash. @jcchavezs, from my understanding, the replace directive was supposed to be a temporary solution, am I wrong?

@jcchavezs
Copy link
Collaborator

Good question, I will check this.

@theseion
Copy link
Collaborator

theseion commented Jun 5, 2024

We don't have a solution but the replace directive was removed with v1.0.0.

@theseion theseion closed this as completed Jun 5, 2024
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

4 participants