migrate icon indicating copy to clipboard operation
migrate copied to clipboard

Makefile does not work on fresh clone on OS X

Open jmouradi opened this issue 8 years ago • 1 comments

I am able to go get github.com/mattes/migrate/cli. However, the name cli is undesirable (see issue #214. Going into the migrate directory after go get github.com/mattes/migrate, running make or make build-cli, I encounter the following errors:

../database/mysql/mysql.go:14:2: cannot find package "github.com/go-sql-driver/mysql" in any of:
        /usr/local/go/src/github.com/go-sql-driver/mysql (from $GOROOT)
        /Users/jmouradian/workspace/go/src/github.com/go-sql-driver/mysql (from $GOPATH)
../source/github/github.go:14:2: cannot find package "github.com/google/go-github/github" in any of:
        /usr/local/go/src/github.com/google/go-github/github (from $GOROOT)
        /Users/jmouradian/workspace/go/src/github.com/google/go-github/github (from $GOPATH)
../database/postgres/postgres.go:10:2: cannot find package "github.com/lib/pq" in any of:
        /usr/local/go/src/github.com/lib/pq (from $GOROOT)
        /Users/jmouradian/workspace/go/src/github.com/lib/pq (from $GOPATH)
make: *** [build-cli] Error 1

Properly resolving dependencies should be a part of the Makefile flow.

Also, just my two cents, but it might make more sense to have the top-level package be the wrapped CLI, with a library that people can depend on as a subpackage within the repository. This would integrate nicely with the go toolchain; go developers may not expect to need to run make to get properly named build artifacts.

jmouradi avatar May 19 '17 18:05 jmouradi

Action items:

  • Properly resolving dependencies should be a part of the Makefile flow
  • #214

it might make more sense to have the top-level package be the wrapped CLI

that was the design in version 1. based on feedback, we changed it to the current design.

mattes avatar May 19 '17 19:05 mattes