#640·glide

Broken cache paths

Author: dustinblackmanCreated Oct 14, 2016Updated Oct 1, 2020

System Specs

OS: OSX 10.12 Glide: 0.12.3 installed from Brew

Overview

I've run in to an issue when attempting to add dependencies to an existing glide project where the path to cache looks rather odd as it's prefixing the full folder path with dashes to the cached folder name. After deleting both my projects vendor folder, as well as running glide cc in different combinations, I can't seem to get past errors such as these. They find ways of breaking with different packages, not just x/sys/unix.

Error Message Example:

...
[INFO]  --> Fetching updates for golang.org/x/text.
[ERROR] Could not find /Users/dustinblackman/.glide/cache/src/https-golang.org-x-sys/unix: open /Users/dustinblackman/.glide/cache/src/https--Users-dustinblackman-.glide-cache-src-https-golang.org-x-sys-unix: no such file or directory
[ERROR] Dependency golang.org/x/sys/unix (/Users/dustinblackman/.glide/cache/src/https-golang.org-x-sys/unix) failed to resolve: open /Users/dustinblackman/.glide/cache/src/https--Users-dustinblackman-.glide-cache-src-https-golang.org-x-sys-unix: no such file or directory.
[ERROR] Failed to retrieve a list of dependencies: open /Users/dustinblackman/.glide/cache/src/https--Users-dustinblackman-.glide-cache-src-https-golang.org-x-sys-unix: no such file or directory

Reproduce

Clean project, no vendor folder, empty glide cache, using the the following glide.yml copied out of one of the projects I'm having this issue with.

yaml
package: github.com/dustinblackman/app
import:
- package: github.com/hpcloud/tail
- package: github.com/fsouza/go-dockerclient
- package: github.com/iris-contrib/middleware
- package: github.com/davecgh/go-spew
- package: github.com/tidwall/gjson
- package: gopkg.in/kataras/iris.v4
- package: github.com/ungerik/go-dry
- package: gopkg.in/fsnotify.v1
  version: ~1.4.1
- package: github.com/spf13/cobra
- package: github.com/spf13/viper
bash
glide install
glide get --all-dependencies github.com/Sirupsen/logrus

After running the last command to install logrus, an error such as the one above will happen.