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

Cannot install 1.3.5 #956

Closed
kaimast opened this issue Jan 4, 2024 · 9 comments · Fixed by #957
Closed

Cannot install 1.3.5 #956

kaimast opened this issue Jan 4, 2024 · 9 comments · Fixed by #957

Comments

@kaimast
Copy link

kaimast commented Jan 4, 2024

Describe the bug
I get the following error when installing 1.3.5. 1.3.4 works fine.

> go install github.com/mgechev/revive@latest  
go: downloading github.com/mgechev/revive v1.3.5
go: github.com/mgechev/revive@latest (in github.com/mgechev/revive@v1.3.5):
        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 happens on my local machine (Arch Linux) and on GitHub actions (Ubuntu 22.04). Both systems have go 1.21.

@matikrk
Copy link

matikrk commented Jan 4, 2024

same on MacOs, go1.21.5 darwin/arm64

@EXHades
Copy link
Contributor

EXHades commented Jan 4, 2024

same on Gitlab CI

Using Docker executor with image golang:1.21.5-alpine
...
$ go run github.com/mgechev/revive@latest ./...
go: downloading github.com/mgechev/revive v1.3.5
go: github.com/mgechev/revive@latest (in github.com/mgechev/revive@v1.3.5):
	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.
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1

@denisvmedia
Copy link
Collaborator

There is this thread: golang/go#44840. It seems like the community feels different than the go devs. I will inspect, why we have replace directive here. But for now, the only way is to clone the repo and build it from the source.

@gemcdaniel
Copy link

Would it be possible to create a new tag/release for this as 1.3.5 (latest) is broken with go install?

@morphy2k
Copy link
Contributor

morphy2k commented Jan 4, 2024

Would it be possible to create a new tag/release for this as 1.3.5 (latest) is broken with go install?

That would be great!

Due to this, I cannot ship the new version together with revive-action without changes to the build process.

@denisvmedia
Copy link
Collaborator

I'm reopening the issue, because although the fix was merged, the release wasn't updated and thus, people keep coming to complain.

cc @mgechev I think need another release to fix the issue. go install doesn't like the replace directive (which anyway was put by mistake I guess).

@shaunco
Copy link

shaunco commented Jan 5, 2024

Please release tag v1.3.6 with the fix for the install issue

@nvuillam
Copy link

nvuillam commented Jan 7, 2024

Same in MegaLinter build :( (Dockerfile alpine-based)

 > [revive 2/2] RUN GOBIN=/usr/bin go install github.com/mgechev/revive@latest:
0.456 go: downloading github.com/mgechev/revive v1.3.5
0.776 go: github.com/mgechev/revive@latest (in github.com/mgechev/revive@v1.3.5):
0.776 	The go.mod file for the module providing named packages contains one or
0.776 	more replace directives. It must not contain directives that would cause
0.776 	it to be interpreted differently than if it were the main module.

@denisvmedia
Copy link
Collaborator

The problem should be fixed now.

$ go install github.com/mgechev/revive@latest
go: downloading github.com/mgechev/revive v1.3.6

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

Successfully merging a pull request may close this issue.

8 participants