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

can't find package github.com/golang-migrate/migrate/v3/database #111

Closed
kostyaVyrodov opened this issue Oct 9, 2018 · 11 comments
Closed
Labels
duplicate This issue or pull request already exists

Comments

@kostyaVyrodov
Copy link

kostyaVyrodov commented Oct 9, 2018

Describe the Bug
An error during getting github.com/golang-migrate/migrate

Steps to Reproduce
Migrate shouldn't be installed
or
Delete the migrate:

  1. rm -rf $GOPATH/src/github.com/golang-migrate/migrate
  2. go get github.com/golang-migrate/migrate
  3. See error: can't find package github.com/golang-migrate/migrate/v3/database

Expected Behavior
go get installs tge migrate successfully

Go Version
go version go1.10.2 darwin/amd64

Stacktrace

package github.com/golang-migrate/migrate/v3/database: cannot find package "github.com/golang-migrate/migrate/v3/database" in any of:
        /usr/local/Cellar/go/1.10.2/libexec/src/github.com/golang-migrate/migrate/v3/database (from $GOROOT)
        /Users/kvyrodov/go/src/github.com/golang-migrate/migrate/v3/database (from $GOPATH)
package github.com/golang-migrate/migrate/v3/source: cannot find package "github.com/golang-migrate/migrate/v3/source" in any of:
        /usr/local/Cellar/go/1.10.2/libexec/src/github.com/golang-migrate/migrate/v3/source (from $GOROOT)
        /Users/kvyrodov/go/src/github.com/golang-migrate/migrate/v3/source (from $GOPATH)
@alexey-belous
Copy link

Have the same issue

@TK95
Copy link

TK95 commented Oct 9, 2018

Greetings.

My team has started to work on a project recently. Unfortunately, we have faced this issue as well. It really slows us down. Could someone take a look and provide a fix?

Thanks in advance.

@dhui
Copy link
Member

dhui commented Oct 9, 2018

Probably related to #103
For a short-term fix, try using a newer version of Go (1.10.3 or 1.11.x).

@kostyaVyrodov
Copy link
Author

kostyaVyrodov commented Oct 9, 2018

@dhui ,

For a short-term fix, try using a newer version of Go (1.10.3 or 1.11.x).

It won't help. Because there is no v3 package/folder in the master branch of the migrate repo.

Thanks for the fast reply. We will wait for updates

@dhui
Copy link
Member

dhui commented Oct 9, 2018

Using a newer version of Go should help as they're module aware

@davidraleigh
Copy link

Problem still exists for golang:1.11-alpine so newer version of go didn't help

@dhui
Copy link
Member

dhui commented Oct 10, 2018

That's odd since CI is passing...

@kostyaVyrodov
Copy link
Author

I am not sure but it seems like the source folder should be inside 'v3' folder...?

image

@nutmix
Copy link

nutmix commented Oct 10, 2018

In an attempt to find a workaround, I checked out the v3.5.0 branch. However, I cant build or install this, it says:

$ cd ~/go/src/github.com/golang-migrate/migrate
$ go build -i migrate.go
./migrate.go:60:6: undefined: Logger

GOPATH and GOBIN are correctly set and exported.

go version go1.10.2 darwin/amd64

In desperation, I also tried downloading the darwin binary, but macos cant execute the resultant file.

@dhui
Copy link
Member

dhui commented Oct 10, 2018

@kostyaVyrodov See how Go modules work: https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

Anyways, a change will be made soon where modules will be removed from v3 and be supported in v4

@davidraleigh
Copy link

davidraleigh commented Oct 10, 2018

v3.5.3 fixed the problems for me, @dhui . I really appreciate your working on it Dale!

@dhui dhui added the duplicate This issue or pull request already exists label Oct 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

6 participants