Closed kaimast closed 9 months ago
same on MacOs, go1.21.5 darwin/arm64
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
There is this thread: https://github.com/golang/go/issues/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.
Would it be possible to create a new tag/release for this as 1.3.5 (latest) is broken with go install?
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.
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).
Please release tag v1.3.6 with the fix for the install issue
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.
The problem should be fixed now.
$ go install github.com/mgechev/revive@latest
go: downloading github.com/mgechev/revive v1.3.6
Describe the bug I get the following error when installing 1.3.5. 1.3.4 works fine.
This happens on my local machine (Arch Linux) and on GitHub actions (Ubuntu 22.04). Both systems have go 1.21.