golang / dep

Go dependency management tool experiment (deprecated)
https://golang.github.io/dep/
BSD 3-Clause "New" or "Revised" License
12.86k stars 1.05k forks source link

"missing from vendor" even though it is there #2203

Closed LINKIWI closed 3 years ago

LINKIWI commented 4 years ago

What version of dep are you using (dep version)?

v0.5.4-2-g5600de07

What dep command did you run?

Minimally reproducible example:

$ cd $GOPATH/src/github.com/whatever/project
$ ls
main.go
$ cat main.go
package main

import (
    _ "golang.zx2c4.com/wireguard/wgctrl"
)
$ dep init
$ cat Gopkg.toml
[[constraint]]
  branch = "master"
  name = "golang.zx2c4.com/wireguard/wgctrl"

[prune]
  go-tests = true
  unused-packages = true
$ cat Gopkg.lock
[[projects]]
  branch = "master"
  digest = "1:6b3b719432ce543e68c97ebcfc503ba239782ad78e658d363436c7181fdff7a8"
  name = "github.com/mdlayher/genetlink"
  packages = ["."]
  pruneopts = "UT"
  revision = "e35f2bf499b9e396bf88e96af81ac1085f5c6f0b"

[[projects]]
  branch = "master"
  digest = "1:7e464212ab9ff806389ade611ea95503c15900cbc6648191b470575413b73024"
  name = "github.com/mdlayher/netlink"
  packages = [
    ".",
    "nlenc",
  ]
  pruneopts = "UT"
  revision = "4e5dd4017dae8175b908a6bd46b1cb7161664633"

[[projects]]
  branch = "master"
  digest = "1:c79dab329e903f5f7793c3f541645f5e4fdaeb222ccd804b0913ea796d0f0213"
  name = "golang.org/x/crypto"
  packages = ["curve25519"]
  pruneopts = "UT"
  revision = "71b5226ff73902d121cd9dbbdfdb67045a805845"

[[projects]]
  branch = "master"
  digest = "1:1fc1c03687700856ef340d185fd0272e3de88b3a5632283ba3f148cf40c5dcc8"
  name = "golang.org/x/net"
  packages = ["bpf"]
  pruneopts = "UT"
  revision = "a7b16738d86b947dd0fadb08ca2c2342b51958b6"

[[projects]]
  branch = "master"
  digest = "1:ee82b03e3db19a6d3ed88db62427809f5dfc18c3bd1afa30f8c2b7e56c6c7565"
  name = "golang.org/x/sys"
  packages = [
    "unix",
    "windows",
  ]
  pruneopts = "UT"
  revision = "d223b2b6db03988709bac9e66576ad6ec0d83695"

[[projects]]
  digest = "1:66bf404c97d65e646d3c95f76c64dd867d6b0972cf797a06341b3b8dc66d4f65"
  name = "golang.zx2c4.com/wireguard"
  packages = ["ipc/winpipe"]
  pruneopts = "UT"
  revision = "7c97fdb1e34babf2697a815b8381037220e0c19b"
  version = "v0.0.20190908"

[[projects]]
  branch = "master"
  digest = "1:91e8e083d860ea7a5e9d1e506c94d38d487d1c70d4cc78f4fe46182ef4c18d6b"
  name = "golang.zx2c4.com/wireguard/wgctrl"
  packages = [
    ".",
    "internal/wginternal",
    "internal/wglinux",
    "internal/wglinux/internal/wgh",
    "internal/wgopenbsd",
    "internal/wgopenbsd/internal/wgh",
    "internal/wguser",
    "wgtypes",
  ]
  pruneopts = "UT"
  revision = "599d41c32142c0c277590bdfa680795b2b5582a5"

[solve-meta]
  analyzer-name = "dep"
  analyzer-version = 1
  input-imports = ["golang.zx2c4.com/wireguard/wgctrl"]
  solver-name = "gps-cdcl"
  solver-version = 1
$ dep check
# vendor is out of sync:
golang.zx2c4.com/wireguard/wgctrl: missing from vendor
$ stat vendor/golang.zx2c4.com/wireguard/wgctrl/
# It's definitely there

What did you expect to see?

dep check should exit 0, and not complain that it can't find a vendor directory that is in fact present

What did you see instead?

dep check does not exit 0, and complains that it can't find a vendor directory, but is is there

I've been hacking away at this for the last few hours with many different combinations of imports in Gopkg.lock but I can't get dep check to succeed; it always reports a vendor inconsistency problem but the vendored files are definitely there.

The dependency repository is golang.zx2c4.com/wireguard/wgctrl, and I am able to successfully go get golang.zx2c4.com/wireguard/wgctrl.

Any pointers would be appreciated.

mvdan commented 3 years ago

Dep was officially deprecated earlier this year, and the proposal to archive this repository was accepted. As such, I'm closing outstanding issues before archiving the repository. For any further comments, please use the proposal thread on the Go issue tracker. Thanks!