You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I would like to use go install, but it didn't work.
$ go install github.com/rubenv/sql-migrate
go install: version is required when current directory is not in a module
Try 'go install github.com/rubenv/sql-migrate@latest' to install the latest version
I needed to use the provided command from the docs, but it shows warnings.
$ go get github.com/rubenv/sql-migrate/...
go get: installing executables with 'go get'in module mode is deprecated.
To adjust and download dependencies of the current module, use 'go get -d'.
To install using requirements of the current module, use 'go install'.
To install ignoring the current module, 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'.
Reacted by Denis Shilkin, Justin Carruthers, fajardm and Issei Murasawa
I guess the problem is that sql-migarte doesn't have any releases. In go 1.17 when you use go install to activate modules you just have to specify the version either latest or commit hash.
Using the latest version IMHO is not an option since on CI you are losing the ability to use a fixed version of the tool.
The better way is to issue a release i.e. v1.0.0 and let people use this version instead of latest or confusing commit hash.
go install -v github.com/rubenv/sql-migrate/sql-migrate@v1.0.0
Activity
shilkin commentedon Dec 23, 2021
I guess the problem is that
sql-migartedoesn't have any releases. In go 1.17 when you usego installto activate modules you just have to specify the version eitherlatestor commit hash.Using the
latestversion IMHO is not an option since on CI you are losing the ability to use a fixed version of the tool.The better way is to issue a release i.e.
v1.0.0and let people use this version instead oflatestor confusing commit hash.would be nice
Dear maintainers WDYT? @rubenv
bluebrown commentedon Dec 23, 2021
I forgot to mention, using @latest did not work.
Edit: I just tried with commit hash, the same issue.
rubenv commentedon Dec 23, 2021
rubenv commentedon Dec 23, 2021
The executable package is in
github.com/rubenv/sql-migrate/sql-migrate, so the path you were using was wrong.Just pushed
v1.0.0!alhamsya commentedon Jan 3, 2022
you can try :
go get -v github.com/rubenv/sql-migrate/...@f842348935589e4563be545226d465178bd439cf