-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
adding /v3/ to urls is a breaking change when building. #103
Comments
Hmmm, wonder if I should have use v4... What version of go are you using? e.g. output of |
The version of go is irrelevant. The URI used in the location does not exist, so building the project as a dependency means the build cannot find the location https://github.com/golang-migrate/migrate/v3 . or anything below it. If you clone the repo and open it in an IDE the IDE is showing this bug. If you try and browse to github.com/golang-migrate/migrate/v3/database you will find it does not exist. If you browse to github.com/golang-migrate/migrate/database you will find it does exist. There are two versions of a fix. Your call. We moved to download the tarball and use it but first, we experienced a breaking change. Developers don't like that too much. |
The version of Go is quite relevant to this discussion. However, all that being said, a goal of this project is to correctly follow SemVer so that it's obvious when a breaking change is made. So I may revert support for Go modules in v3 and support Go modules in v4, depending on the breakage that's being experienced. Are you using anything to manage your dependencies? If so, for now, if you pin |
How do you actually pin to a specific version? I'm trying to fix a CircleCI script and suddenly the build now fails when trying to install migrate. (I didn't write the original project; I'm only updating the configuration for the build, so I only have a vague idea how this project is supposet to work. And I have no real experience with go programming.) The current relevant part of the config that fails is: apk add go glide musl-dev
go get github.com/lib/pq github.com/golang-migrate/migrate/cli
glide install
go build -tags 'postgres' -o migrate github.com/golang-migrate/migrate/cli I tried pinning using the url for the v3.5.0 tag like this: package: github.com/mycompany/myproject
import:
- package: github.com/golang-migrate/migrate/cli
version: v3.5.0
# ... But then the
(Which makes sense as there is no Am I missing something? |
@strindhaug What version of Go are you using? e.g. run Per the Go module wiki:
Migrate uses the first option to opt into modules with a v2+ module |
So what you're saying is that even the latest beta build of |
@strindhaug The latest version of $ docker pull migrate/migrate
Using default tag: latest
latest: Pulling from migrate/migrate
Digest: sha256:56f31ebe8cb7ae27eaf391865f0b3857767ee780ad8f93bd7a0668e718ecf76d
Status: Image is up to date for migrate/migrate:latest
$ docker run --rm migrate/migrate -version
v3.5.2
$ If you're running Go in a docker container, I suggest using one of docker's official Go image |
Seeing a similar issue when using |
@andrewpmartinez If the version pin is not honored, you'll need to run Go 1.9.7+, 1.10.3+, or 1.11 and update your imports to include Honestly, it's pretty straight forward to run Go 1.11 and use Go modules. |
govendor supports Thanks for your help. I appreciate it! |
@dhui Just my 2 cents: I ran into the same issue with The only way I found (later) to make it work for all constellations was to move all code from Notice that I don't blame BTW: If you decide to remove Go module support introduced in 3.5.2, you should also remove the |
@olivere Thanks for sharing! That info was really helpful. It seems like the root cause for this issue is due the following:
This essentially leaves package maintainers who have packages released with versions >= v2 with the following options:
Go modules are the future as all other package managers will be superseded by Go modules. Thus other package managers will not be supported by Until this issue is resolved, I'd suggest that if you want to opt-out of Go modules, don't upgrade to PollSince there doesn't seem to be a clear correct solution with
|
As of 10/10/2018, there are 8 ❤️ s and no other votes/emoji, so we'll go w/ option 4:
|
The change has been made. Lemme know if you continue to have issues. |
Issue should be resolved now |
When building the project there is no such place as
```https://github.com/golang-migrate/migrate/v3/``
so the build cannot import its dependencies and the build fails.
Steps to Reproduce
Build the project as below
go build -tags 'postgres' -o ~/go/bin/migrate github.com/golang-migrate/migrate/cli
Expected Behavior
I expect the binary to be built and deployed to $GOPATH/bin/migrate
Migrate Version
v3.5.2
The text was updated successfully, but these errors were encountered: