{"action":"created","issue":{"url":"https://api.github.com/repos/Masterminds/glide/issues/578","repository_url":"https://api.github.com/repos/Masterminds/glide","labels_url":"https://api.github.com/repos/Masterminds/glide/issues/578/labels{/name}","comments_url":"https://api.github.com/repos/Masterminds/glide/issues/578/comments","events_url":"https://api.github.com/repos/Masterminds/glide/issues/578/events","html_url":"https://github.com/Masterminds/glide/issues/578","id":172997986,"number":578,"title":"Unable to create or update lock file for project when project directory is missing from cache","user":{"login":"jrick","id":1420313,"avatar_url":"https://avatars.githubusercontent.com/u/1420313?v=3","gravatar_id":"","url":"https://api.github.com/users/jrick","html_url":"https://github.com/jrick","followers_url":"https://api.github.com/users/jrick/followers","following_url":"https://api.github.com/users/jrick/following{/other_user}","gists_url":"https://api.github.com/users/jrick/gists{/gist_id}","starred_url":"https://api.github.com/users/jrick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrick/subscriptions","organizations_url":"https://api.github.com/users/jrick/orgs","repos_url":"https://api.github.com/users/jrick/repos","events_url":"https://api.github.com/users/jrick/events{/privacy}","received_events_url":"https://api.github.com/users/jrick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-08-24T16:21:47Z","updated_at":"2016-08-29T15:15:23Z","closed_at":null,"body":"I'm seeing an issue trying to update dependencies for `github.com/decred/dcrd` when `glide update` is run from bitrig (an openbsd fork):\r\n\r\n```\r\nScript started on Wed Aug 24 12:08:23 2016\r\n$ \r\n\u001B[0J$ pwd\r\n\r\n/home/jrick/src/go/src/github.com/decred/dcrd\r\n$ \r\n\u001B[0J$ glide --no-color update\r\n\r\n[INFO]  Downloading dependencies. Please wait...\r\n[INFO]  --> Fetching updates for github.com/btcsuite/btclog.\r\n[INFO]  --> Fetching updates for github.com/btcsuite/fastsha256.\r\n[INFO]  --> Fetching updates for github.com/btcsuite/websocket.\r\n[INFO]  --> Fetching updates for github.com/btcsuite/go-socks.\r\n[INFO]  --> Fetching updates for github.com/btcsuite/winsvc.\r\n[INFO]  --> Fetching updates for github.com/btcsuite/seelog.\r\n[INFO]  --> Fetching updates for github.com/btcsuite/goleveldb.\r\n[INFO]  --> Fetching updates for github.com/btcsuite/golangcrypto.\r\n[INFO]  --> Fetching updates for github.com/davecgh/go-spew.\r\n[INFO]  --> Fetching updates for github.com/decred/bitset.\r\n[INFO]  --> Fetching updates for github.com/decred/blake256.\r\n[INFO]  --> Fetching updates for github.com/decred/dcrrpcclient.\r\n[INFO]  --> Fetching updates for github.com/decred/dcrutil.\r\n[INFO]  --> Fetching updates for github.com/decred/ed25519.\r\n[INFO]  --> Fetching updates for golang.org/x/crypto.\r\n[INFO]  --> Fetching updates for github.com/btcsuite/go-flags.\r\n[INFO]  --> Setting version for github.com/btcsuite/seelog to v2.1.\r\n[INFO]  Resolving imports\r\n[ERROR] Error scanning github.com/decred/dcrd/chaincfg/chainhash: open /home/jrick/.glide/cache/src/https-github.com-decred-dcrd/chaincfg/chainhash: no such file or directory\r\n[ERROR] This error means the referenced package was not found.\r\n[ERROR] Missing file or directory errors usually occur when multiple packages\r\n[ERROR] share a common dependency and the first reference encountered by the scanner\r\n[ERROR] sets the version to one that does not contain a subpackage needed required\r\n[ERROR] by another package that uses the shared dependency. Try setting a\r\n[ERROR] version in your glide.yaml that works for all packages that share this\r\n[ERROR] dependency.\r\n[ERROR] Error scanning github.com/decred/dcrd/wire: open /home/jrick/.glide/cache/src/https-github.com-decred-dcrd/wire: no such file or directory\r\n[ERROR] This error means the referenced package was not found.\r\n[ERROR] Missing file or directory errors usually occur when multiple packages\r\n[ERROR] share a common dependency and the first reference encountered by the scanner\r\n[ERROR] sets the version to one that does not contain a subpackage needed required\r\n[ERROR] by another package that uses the shared dependency. Try setting a\r\n[ERROR] version in your glide.yaml that works for all packages that share this\r\n[ERROR] dependency.\r\n[INFO]  --> Fetching updates for github.com/btcsuite/snappy-go.\r\n[ERROR] Error scanning github.com/decred/dcrd/chaincfg: open /home/jrick/.glide/cache/src/https-github.com-decred-dcrd/chaincfg: no such file or directory\r\n[ERROR] This error means the referenced package was not found.\r\n[ERROR] Missing file or directory errors usually occur when multiple packages\r\n[ERROR] share a common dependency and the first reference encountered by the scanner\r\n[ERROR] sets the version to one that does not contain a subpackage needed required\r\n[ERROR] by another package that uses the shared dependency. Try setting a\r\n[ERROR] version in your glide.yaml that works for all packages that share this\r\n[ERROR] dependency.\r\n[ERROR] Error scanning github.com/decred/dcrd/chaincfg/chainec: open /home/jrick/.glide/cache/src/https-github.com-decred-dcrd/chaincfg/chainec: no such file or directory\r\n[ERROR] This error means the referenced package was not found.\r\n[ERROR] Missing file or directory errors usually occur when multiple packages\r\n[ERROR] share a common dependency and the first reference encountered by the scanner\r\n[ERROR] sets the version to one that does not contain a subpackage needed required\r\n[ERROR] by another package that uses the shared dependency. Try setting a\r\n[ERROR] version in your glide.yaml that works for all packages that share this\r\n[ERROR] dependency.\r\n[ERROR] Error scanning github.com/decred/dcrd/blockchain: open /home/jrick/.glide/cache/src/https-github.com-decred-dcrd/blockchain: no such file or directory\r\n[ERROR] This error means the referenced package was not found.\r\n[ERROR] Missing file or directory errors usually occur when multiple packages\r\n[ERROR] share a common dependency and the first reference encountered by the scanner\r\n[ERROR] sets the version to one that does not contain a subpackage needed required\r\n[ERROR] by another package that uses the shared dependency. Try setting a\r\n[ERROR] version in your glide.yaml that works for all packages that share this\r\n[ERROR] dependency.\r\n[ERROR] Error scanning github.com/decred/dcrd/txscript: open /home/jrick/.glide/cache/src/https-github.com-decred-dcrd/txscript: no such file or directory\r\n[ERROR] This error means the referenced package was not found.\r\n[ERROR] Missing file or directory errors usually occur when multiple packages\r\n[ERROR] share a common dependency and the first reference encountered by the scanner\r\n[ERROR] sets the version to one that does not contain a subpackage needed required\r\n[ERROR] by another package that uses the shared dependency. Try setting a\r\n[ERROR] version in your glide.yaml that works for all packages that share this\r\n[ERROR] dependency.\r\n[ERROR] Error scanning github.com/decred/dcrd/dcrjson: open /home/jrick/.glide/cache/src/https-github.com-decred-dcrd/dcrjson: no such file or directory\r\n[ERROR] This error means the referenced package was not found.\r\n[ERROR] Missing file or directory errors usually occur when multiple packages\r\n[ERROR] share a common dependency and the first reference encountered by the scanner\r\n[ERROR] sets the version to one that does not contain a subpackage needed required\r\n[ERROR] by another package that uses the shared dependency. Try setting a\r\n[ERROR] version in your glide.yaml that works for all packages that share this\r\n[ERROR] dependency.\r\n[ERROR] Failed to retrieve a list of dependencies: Error resolving imports\r\n$ \r\n\u001B[0J$ exit\r\n\r\n\r\nScript done on Wed Aug 24 12:09:29 2016\r\n```\r\n\r\nIt also seems impossible to `update` even when an entirely new glide.yaml is created from `glide init`:\r\n\r\n```\r\nScript started on Wed Aug 24 12:15:33 2016\r\n$ \r\n\u001B[0J$ rm glide.yaml glide.lock\r\n\r\n$ \r\n\u001B[0J$ glide --no-color init\r\n\r\n[INFO]  Generating a YAML configuration file and guessing the dependencies\r\n[INFO]  Attempting to import from other package managers (use --skip-import to skip)\r\n[INFO]  Scanning code to look for dependencies\r\n[INFO]  --> Found reference to github.com/btcsuite/btclog\r\n[INFO]  --> Found reference to github.com/btcsuite/fastsha256\r\n[INFO]  --> Found reference to github.com/btcsuite/go-flags\r\n[INFO]  --> Found reference to github.com/btcsuite/go-socks/socks\r\n[INFO]  --> Found reference to github.com/btcsuite/golangcrypto/ripemd160\r\n[INFO]  --> Found reference to github.com/btcsuite/goleveldb/leveldb\r\n[INFO]  --> Adding sub-package leveldb/comparer to github.com/btcsuite/goleveldb\r\n[INFO]  --> Adding sub-package leveldb/errors to github.com/btcsuite/goleveldb\r\n[INFO]  --> Adding sub-package leveldb/filter to github.com/btcsuite/goleveldb\r\n[INFO]  --> Adding sub-package leveldb/iterator to github.com/btcsuite/goleveldb\r\n[INFO]  --> Adding sub-package leveldb/opt to github.com/btcsuite/goleveldb\r\n[INFO]  --> Adding sub-package leveldb/util to github.com/btcsuite/goleveldb\r\n[INFO]  --> Found reference to github.com/btcsuite/seelog\r\n[INFO]  --> Found reference to github.com/btcsuite/websocket\r\n[INFO]  --> Found reference to github.com/btcsuite/winsvc/eventlog\r\n[INFO]  --> Adding sub-package mgr to github.com/btcsuite/winsvc\r\n[INFO]  --> Adding sub-package svc to github.com/btcsuite/winsvc\r\n[INFO]  --> Found reference to github.com/davecgh/go-spew/spew\r\n[INFO]  --> Found reference to github.com/decred/bitset\r\n[INFO]  --> Found reference to github.com/decred/blake256\r\n[INFO]  --> Found reference to github.com/decred/dcrrpcclient\r\n[INFO]  --> Found reference to github.com/decred/dcrutil\r\n[INFO]  --> Adding sub-package bloom to github.com/decred/dcrutil\r\n[INFO]  --> Found reference to github.com/decred/ed25519\r\n[INFO]  --> Adding sub-package edwards25519 to github.com/decred/ed25519\r\n[INFO]  --> Found reference to golang.org/x/crypto/ssh/terminal\r\n[INFO]  --> Found test reference to github.com/stretchr/testify/assert\r\n[INFO]  Writing configuration file (glide.yaml)\r\n[INFO]  Would you like Glide to help you find ways to improve your glide.yaml configuration?\r\n[INFO]  If you want to revisit this step you can use the config-wizard command at any time.\r\n[INFO]  Yes (Y) or No (N)?\r\nn\r\n[INFO]  You can now edit the glide.yaml file. Consider:\r\n[INFO]  --> Using versions and ranges. See https://glide.sh/docs/versions/\r\n[INFO]  --> Adding additional metadata. See https://glide.sh/docs/glide.yaml/\r\n[INFO]  --> Running the config-wizard command to improve the versions in your configuration\r\n$ \r\n\u001B[0J$ glide --no-color update\r\n\r\n[INFO]  Downloading dependencies. Please wait...\r\n[INFO]  --> Fetching updates for github.com/btcsuite/go-flags.\r\n[INFO]  --> Fetching updates for github.com/davecgh/go-spew.\r\n[INFO]  --> Fetching updates for github.com/btcsuite/winsvc.\r\n[INFO]  --> Fetching updates for github.com/decred/blake256.\r\n[INFO]  --> Fetching updates for github.com/btcsuite/goleveldb.\r\n[INFO]  --> Fetching updates for github.com/btcsuite/golangcrypto.\r\n[INFO]  --> Fetching updates for github.com/btcsuite/go-socks.\r\n[INFO]  --> Fetching updates for github.com/decred/bitset.\r\n[INFO]  --> Fetching updates for github.com/btcsuite/seelog.\r\n[INFO]  --> Fetching updates for github.com/btcsuite/websocket.\r\n[INFO]  --> Fetching updates for github.com/decred/ed25519.\r\n[INFO]  --> Fetching updates for github.com/decred/dcrrpcclient.\r\n[INFO]  --> Fetching updates for github.com/btcsuite/fastsha256.\r\n[INFO]  --> Fetching updates for github.com/btcsuite/btclog.\r\n[INFO]  --> Fetching updates for github.com/decred/dcrutil.\r\n[INFO]  --> Fetching updates for golang.org/x/crypto.\r\n[INFO]  --> Fetching updates for github.com/stretchr/testify.\r\n[INFO]  Resolving imports\r\n[ERROR] Error scanning github.com/decred/dcrd/chaincfg/chainhash: open /home/jrick/.glide/cache/src/https-github.com-decred-dcrd/chaincfg/chainhash: no such file or directory\r\n[ERROR] This error means the referenced package was not found.\r\n[ERROR] Missing file or directory errors usually occur when multiple packages\r\n[ERROR] share a common dependency and the first reference encountered by the scanner\r\n[ERROR] sets the version to one that does not contain a subpackage needed required\r\n[ERROR] by another package that uses the shared dependency. Try setting a\r\n[ERROR] version in your glide.yaml that works for all packages that share this\r\n[ERROR] dependency.\r\n[ERROR] Error scanning github.com/decred/dcrd/wire: open /home/jrick/.glide/cache/src/https-github.com-decred-dcrd/wire: no such file or directory\r\n[ERROR] This error means the referenced package was not found.\r\n[ERROR] Missing file or directory errors usually occur when multiple packages\r\n[ERROR] share a common dependency and the first reference encountered by the scanner\r\n[ERROR] sets the version to one that does not contain a subpackage needed required\r\n[ERROR] by another package that uses the shared dependency. Try setting a\r\n[ERROR] version in your glide.yaml that works for all packages that share this\r\n[ERROR] dependency.\r\n[INFO]  --> Fetching updates for github.com/btcsuite/snappy-go.\r\n[ERROR] Error scanning github.com/decred/dcrd/chaincfg: open /home/jrick/.glide/cache/src/https-github.com-decred-dcrd/chaincfg: no such file or directory\r\n[ERROR] This error means the referenced package was not found.\r\n[ERROR] Missing file or directory errors usually occur when multiple packages\r\n[ERROR] share a common dependency and the first reference encountered by the scanner\r\n[ERROR] sets the version to one that does not contain a subpackage needed required\r\n[ERROR] by another package that uses the shared dependency. Try setting a\r\n[ERROR] version in your glide.yaml that works for all packages that share this\r\n[ERROR] dependency.\r\n[ERROR] Error scanning github.com/decred/dcrd/chaincfg/chainec: open /home/jrick/.glide/cache/src/https-github.com-decred-dcrd/chaincfg/chainec: no such file or directory\r\n[ERROR] This error means the referenced package was not found.\r\n[ERROR] Missing file or directory errors usually occur when multiple packages\r\n[ERROR] share a common dependency and the first reference encountered by the scanner\r\n[ERROR] sets the version to one that does not contain a subpackage needed required\r\n[ERROR] by another package that uses the shared dependency. Try setting a\r\n[ERROR] version in your glide.yaml that works for all packages that share this\r\n[ERROR] dependency.\r\n[ERROR] Error scanning github.com/decred/dcrd/blockchain: open /home/jrick/.glide/cache/src/https-github.com-decred-dcrd/blockchain: no such file or directory\r\n[ERROR] This error means the referenced package was not found.\r\n[ERROR] Missing file or directory errors usually occur when multiple packages\r\n[ERROR] share a common dependency and the first reference encountered by the scanner\r\n[ERROR] sets the version to one that does not contain a subpackage needed required\r\n[ERROR] by another package that uses the shared dependency. Try setting a\r\n[ERROR] version in your glide.yaml that works for all packages that share this\r\n[ERROR] dependency.\r\n[ERROR] Error scanning github.com/decred/dcrd/txscript: open /home/jrick/.glide/cache/src/https-github.com-decred-dcrd/txscript: no such file or directory\r\n[ERROR] This error means the referenced package was not found.\r\n[ERROR] Missing file or directory errors usually occur when multiple packages\r\n[ERROR] share a common dependency and the first reference encountered by the scanner\r\n[ERROR] sets the version to one that does not contain a subpackage needed required\r\n[ERROR] by another package that uses the shared dependency. Try setting a\r\n[ERROR] version in your glide.yaml that works for all packages that share this\r\n[ERROR] dependency.\r\n[ERROR] Error scanning github.com/decred/dcrd/dcrjson: open /home/jrick/.glide/cache/src/https-github.com-decred-dcrd/dcrjson: no such file or directory\r\n[ERROR] This error means the referenced package was not found.\r\n[ERROR] Missing file or directory errors usually occur when multiple packages\r\n[ERROR] share a common dependency and the first reference encountered by the scanner\r\n[ERROR] sets the version to one that does not contain a subpackage needed required\r\n[ERROR] by another package that uses the shared dependency. Try setting a\r\n[ERROR] version in your glide.yaml that works for all packages that share this\r\n[ERROR] dependency.\r\n[ERROR] Failed to retrieve a list of dependencies: Error resolving imports\r\n$ \r\n\u001B[0J$ exit\r\n\r\n\r\nScript done on Wed Aug 24 12:16:13 2016\r\n```\r\n\r\nThe same project can be successfully updated on Windows, and produces the following lockfile:\r\n\r\n```\r\nhash: 4648b5e89ce577ac30492bc77edc33a1176f4cbbb021495b1cb522c2588a5e90\r\nupdated: 2016-08-24T11:50:28.3908857-04:00\r\nimports:\r\n- name: github.com/btcsuite/btclog\r\n  version: 73889fb79bd687870312b6e40effcecffbd57d30\r\n- name: github.com/btcsuite/fastsha256\r\n  version: 637e656429416087660c84436a2a035d69d54e2e\r\n- name: github.com/btcsuite/go-flags\r\n  version: 6c288d648c1cc1befcb90cb5511dcacf64ae8e61\r\n- name: github.com/btcsuite/go-socks\r\n  version: cfe8b59e565c1a5bd4e2005d77cd9aa8b2e14524\r\n  subpackages:\r\n  - socks\r\n- name: github.com/btcsuite/golangcrypto\r\n  version: 53f62d9b43e87a6c56975cf862af7edf33a8d0df\r\n  subpackages:\r\n  - ripemd160\r\n- name: github.com/btcsuite/goleveldb\r\n  version: 7834afc9e8cd15233b6c3d97e12674a31ca24602\r\n  subpackages:\r\n  - leveldb\r\n  - leveldb/cache\r\n  - leveldb/comparer\r\n  - leveldb/errors\r\n  - leveldb/filter\r\n  - leveldb/iterator\r\n  - leveldb/journal\r\n  - leveldb/memdb\r\n  - leveldb/opt\r\n  - leveldb/storage\r\n  - leveldb/table\r\n  - leveldb/util\r\n- name: github.com/btcsuite/seelog\r\n  version: ae8891d029dd3c269dcfd6f261ad23e761acd99f\r\n- name: github.com/btcsuite/snappy-go\r\n  version: 0bdef8d067237991ddaa1bb6072a740bc40601ba\r\n- name: github.com/btcsuite/websocket\r\n  version: 31079b6807923eb23992c421b114992b95131b55\r\n- name: github.com/btcsuite/winsvc\r\n  version: f8fb11f83f7e860e3769a08e6811d1b399a43722\r\n  subpackages:\r\n  - eventlog\r\n  - mgr\r\n  - registry\r\n  - svc\r\n  - winapi\r\n- name: github.com/davecgh/go-spew\r\n  version: 6cf5744a041a0022271cefed95ba843f6d87fd51\r\n  subpackages:\r\n  - spew\r\n- name: github.com/decred/bitset\r\n  version: 484b833245d5f9046e2893a6bd2e54b1df3a53a4\r\n- name: github.com/decred/blake256\r\n  version: a840e32d7c31fe2e0218607334cb120a683951a4\r\n- name: github.com/decred/dcrd\r\n  version: 1c9d038acd64494435abe59fc5a2b136c1793354\r\n  subpackages:\r\n  - addrmgr\r\n  - blockchain\r\n  - blockchain/dbnamespace\r\n  - blockchain/indexers\r\n  - blockchain/stake\r\n  - chaincfg\r\n  - chaincfg/chainec\r\n  - chaincfg/chainhash\r\n  - database\r\n  - database/ffldb\r\n  - database/internal/treap\r\n  - dcrec/edwards\r\n  - dcrec/secp256k1\r\n  - dcrec/secp256k1/schnorr\r\n  - dcrjson\r\n  - limits\r\n  - mining\r\n  - peer\r\n  - txscript\r\n  - wire\r\n- name: github.com/decred/dcrrpcclient\r\n  version: 103ed11be3a7035554d3925fbfaa67742641510f\r\n- name: github.com/decred/dcrutil\r\n  version: 4fc91a08eea88e74539d42d6301fd298b9bd8230\r\n  subpackages:\r\n  - base58\r\n  - bloom\r\n- name: github.com/decred/ed25519\r\n  version: b0909d3f798b97a03c9e77023f97a5301a2a7900\r\n  subpackages:\r\n  - edwards25519\r\n- name: golang.org/x/crypto\r\n  version: 986d3313588aa5c68f1df95eac956f79cf3b2c01\r\n  subpackages:\r\n  - ssh/terminal\r\ntestImports:\r\n- name: github.com/pmezard/go-difflib\r\n  version: 792786c7400a136282c1664665ae0a8db921c6c2\r\n  subpackages:\r\n  - difflib\r\n- name: github.com/stretchr/testify\r\n  version: d77da356e56a7428ad25149ca77381849a6a5232\r\n  subpackages:\r\n  - assert\r\n```\r\n\r\n(Sidenote: Why did it list the project itself in the lockfile?)\r\n\r\n\r\nI've gone through all dependencies in the vendor directory on Windows where the update succeeded, and did not find any other projects that included a glide.yaml, so those error messages about unsatisified version requirements don't make much sense in this case."},"comment":{"url":"https://api.github.com/repos/Masterminds/glide/issues/comments/243154793","html_url":"https://github.com/Masterminds/glide/issues/578#issuecomment-243154793","issue_url":"https://api.github.com/repos/Masterminds/glide/issues/578","id":243154793,"user":{"login":"kujenga","id":4854867,"avatar_url":"https://avatars.githubusercontent.com/u/4854867?v=3","gravatar_id":"","url":"https://api.github.com/users/kujenga","html_url":"https://github.com/kujenga","followers_url":"https://api.github.com/users/kujenga/followers","following_url":"https://api.github.com/users/kujenga/following{/other_user}","gists_url":"https://api.github.com/users/kujenga/gists{/gist_id}","starred_url":"https://api.github.com/users/kujenga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kujenga/subscriptions","organizations_url":"https://api.github.com/users/kujenga/orgs","repos_url":"https://api.github.com/users/kujenga/repos","events_url":"https://api.github.com/users/kujenga/events{/privacy}","received_events_url":"https://api.github.com/users/kujenga/received_events","type":"User","site_admin":false},"created_at":"2016-08-29T15:15:23Z","updated_at":"2016-08-29T15:15:23Z","body":"Thanks @mattfarina for the response! I'm seeing the same behavior that @jrick just posted after following those steps. My feeling is that there isn't any corruption of elements in the cache here, it's just not handling the case where an element in the cache is totally missing, when it's looking for something from the current repo in the cache.\r\n\r\nIn the example posted by @jrick above, do you have a sense of why it's even looking in the cache for packages that are within the current repo? My impression was that this is occurring when a dependency of the current repo depends on the current repo, e.g. A -> B -> A."}}
{"actor":{"display_login":"kujenga"}}