Migrate: failed on go1.13

Created on 19 Nov 2019  路  11Comments  路  Source: golang-migrate/migrate

Describe the Bug

>>> go get -u -d github.com/golang-migrate/migrate/cmd/migrate
go: finding github.com/golang-migrate/migrate/cmd/migrate latest
go: finding github.com/golang-migrate/migrate/cmd latest
go get github.com/golang-migrate/migrate/cmd/migrate: module github.com/golang-migrate/migrate@upgrade (v3.5.4+incompatible) found, but does not contain package github.com/golang-migrate/migrate/cmd/migrate

Steps to Reproduce
my environment:

GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/myname/Library/Caches/go-build"
GOENV="/Users/myname/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY="*.mycompany.com"
GONOSUMDB="*.mycompany.com"
GOOS="darwin"
GOPATH="/Users/haowen/.gvm/pkgsets/go1.13/global"
GOPRIVATE="*.mycompany.com"
GOPROXY="https://goproxy.cn,direct"
GOROOT="/Users/mycompany/.gvm/gos/go1.13"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/mycompany/.gvm/gos/go1.13/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/h1/9ltt1sp94_x8yzjxjjw5ppbr0000gp/T/go-build058717330=/tmp/go-build -gno-record-gcc-switches -fno-common"

Expected Behavior
get repo successful

Most helpful comment

go get -tags 'mysql' -u github.com/golang-migrate/migrate/v4/cmd/migrate@master

this command really help for me, https://github.com/golang-migrate/migrate/issues/302#issuecomment-557411691 this is the true reason for above error, may solved after a new release tag made.

All 11 comments

go get -tags 'mysql' -u github.com/golang-migrate/migrate/v4/cmd/migrate/
this command raise a new problem with:

go get: github.com/kshvakov/[email protected] updating to
    github.com/kshvakov/[email protected]: parsing go.mod:
    module declares its path as: github.com/ClickHouse/clickhouse-go
            but was required as: github.com/kshvakov/clickhouse

looks like caused by module define with repo github.com/kshvakov/clickhouse I guess update migrate repo's go.mod file may be help to this problem

Same problem this morning

I've submitted a PR at #305 hopefully can be approved and merged ASAP.
This is happening because @kshvakov move his package to the ClickHouse organization.

Anyway, is there any short-term solution? Since waiting for PR to be approved may takes time 馃

>>> go get -tags 'mysql' -u github.com/golang-migrate/migrate/v4/cmd/migrate/
go get: github.com/kshvakov/[email protected] updating to
    github.com/kshvakov/[email protected]: parsing go.mod:
    module declares its path as: github.com/ClickHouse/clickhouse-go
            but was required as: github.com/kshvakov/clickhouse

different error but still broken

@FelixSeptem try to fetch the master version

go get -tags 'postgres' -u github.com/golang-migrate/migrate/v4/cmd/migrate@master

It happened since the go get will fetch the last released version. That still using the old dependencies

Can you release a new version @dhui?
And also some announcements to tell people to update the version. I'm afraid this will affected the old version.

go get -tags 'mysql' -u github.com/golang-migrate/migrate/v4/cmd/migrate@master

this command really help for me, https://github.com/golang-migrate/migrate/issues/302#issuecomment-557411691 this is the true reason for above error, may solved after a new release tag made.

Released v4.7.1

Was this page helpful?
0 / 5 - 0 ratings