konveyor / move2kube

Move2Kube is a command-line tool for automating creation of Infrastructure as code (IaC) artifacts. It has inbuilt support for creating IaC artifacts for replatforming to Kubernetes/Openshift.
https://move2kube.konveyor.io/
Apache License 2.0
383 stars 118 forks source link

Go get is removed in go 1.18 and go install does not work #864

Closed jmontleon closed 5 months ago

jmontleon commented 1 year ago

Describe the bug The docs for alternative installed methods suggests go get as an option, but installing using go get was deprecated in golang 1.17 and removed in 1.18.

go install requires that there be no replaces so it also doesn't work because there are several replaces in the go.mod file for rmove2kube.

To Reproduce

$ rpm -q golang
golang-1.18.6-1.fc36.x86_64

$ go get -u github.com/konveyor/move2kube
go: go.mod file not found in current directory or any parent directory.
    'go get' is no longer supported outside a module.
    To build and install a command, use 'go install' with a version,
    like 'go install example.com/cmd@latest'
    For more information, see https://golang.org/doc/go-get-install-deprecation
    or run 'go help get' or 'go help install'.
$ go install github.com/konveyor/move2kube@v0.3.4
go: downloading github.com/konveyor/move2kube v0.3.4
go: github.com/konveyor/move2kube@v0.3.4 (in github.com/konveyor/move2kube@v0.3.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.

Expected behavior That it is possible to use go install to install move2kube.

Desktop (please complete the following information):

Additional context https://go.dev/doc/go-get-install-deprecation https://github.com/golang/go/issues/44840

ashokponkumar commented 1 year ago

The only possible solution currently is to remove the alternate install method. Do feel free to create a PR in the move2kube-website repo.

HarikrishnanBalagopal commented 5 months ago

Fixed in https://github.com/konveyor/move2kube-website/pull/141