glide
glide copied to clipboard
Unable to checkout gonum.org/v1/gonum
Hello. I have a problem using glide in my project.
Please tell me what is my problem?
Situation
- I'm using
github.com/gonum/plot
in my project. - I'm using
glide
. - Only
main.go
is in my repository.
package main
import (
"github.com/gonum/plot"
)
func main() {
plot.New()
}
Expected
glide update
works.
Actual
glide update
returns error with output below.
% glide update
[INFO] Downloading dependencies. Please wait...
[INFO] --> Fetching updates for github.com/gonum/plot.
[INFO] Resolving imports
[INFO] --> Fetching gonum.org/v1/gonum.
[WARN] Unable to checkout gonum.org/v1/gonum
[INFO] --> Fetching updates for github.com/golang/freetype.
[INFO] --> Fetching updates for golang.org/x/image.
[INFO] --> Fetching updates for github.com/llgcode/draw2d.
[INFO] --> Fetching updates for bitbucket.org/zombiezen/gopdf.
[INFO] --> Fetching updates for github.com/ajstarks/svgo.
[INFO] Downloading dependencies. Please wait...
[INFO] Setting references for remaining imports
[ERROR] Failed to set version on gonum.org/v1/gonum to : https://gonum.org/v1/gonum Not Found
[ERROR] Failed to set references: https://gonum.org/v1/gonum Not Found (Skip to cleanup)
[INFO] Exporting resolved dependencies...
[INFO] --> Exporting github.com/gonum/plot
[INFO] --> Exporting github.com/golang/freetype
[INFO] --> Exporting github.com/llgcode/draw2d
[INFO] --> Exporting github.com/ajstarks/svgo
[INFO] --> Exporting golang.org/x/image
[INFO] --> Exporting bitbucket.org/zombiezen/gopdf
[ERROR] https://gonum.org/v1/gonum Not Found
That is because as of yet gonum is not a package. Sad I know, hopefully it will be soon.
A temporary solution:
glide mirror set https://gonum.org/v1/plot https://github.com/gonum/plot
I find it's probably easiest to add gonum to ignore
within glide.yaml
.
ignore:
- gonum.org/v1/gonum/floats
Unfortunately, the solutions described above don't work when deploying on services like Heroku which fetch packages using Glide on remote (so I doubt Glide mirror can be used in this case). The dirtiest, but guarenteed-to-work option here is to use sources instead of package