Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Unable to use "go vet" when using "dep ensure" #348

Closed
@delanne

Description

@delanne

When I do "dep ensure -v" in order to fech dependencies, the "go vet" command fails with:

vet: /go/src/foo/bar/main.go:4:2: could not import github.com/Sirupsen/logrus (can't find import: foo/vendor/github.com/Sirupsen/logrus)

In order to be able to use the "go vet" command, I need to do a "go get" after "dep ensure"

In attachment: dep_issue.zip in order to reproduce the issue.

$ unzip dep_issue.zip && cd dep_issue && docker run --rm -v "$PWD":/go -w /go golang:1.8.0 ./build.sh
Archive:  dep_issue.zip
   creating: dep_issue/
  inflating: dep_issue/build.sh      
   creating: dep_issue/src/
   creating: dep_issue/src/foo/
  inflating: dep_issue/src/foo/lock.json  
 extracting: dep_issue/src/foo/manifest.json  
   creating: dep_issue/src/foo/bar/
  inflating: dep_issue/src/foo/bar/main.go  

-- installing dep --

github.com/golang/dep (download)
github.com/golang/dep/vendor/github.com/Masterminds/semver
github.com/golang/dep/vendor/github.com/pkg/errors
github.com/golang/dep/hack/licenseok
github.com/golang/dep/vendor/github.com/Masterminds/vcs
github.com/golang/dep/vendor/github.com/armon/go-radix
github.com/golang/dep/test
github.com/golang/dep/vendor/github.com/sdboyer/gps
github.com/golang/dep
github.com/golang/dep/cmd/dep

-- dependencies --

Root project is "foo"
 1 transitively valid internal packages
 1 external packages imported from 1 projects
(0)   ✓ select (root)
(1)	? attempt github.com/Sirupsen/logrus with 1 pkgs; at least 1 versions to try
(1)	    try github.com/Sirupsen/logrus@v0.11.5
(1)	✓ select github.com/Sirupsen/logrus@v0.11.5 w/1 pkgs
(2)	? attempt golang.org/x/sys with 1 pkgs; at least 1 versions to try
(2)	    try golang.org/x/sys@master
(2)	✓ select golang.org/x/sys@master w/1 pkgs
  ✓ found solution with 2 packages from 2 projects
         b-list-pkgs: 4.345450828s
     b-source-exists:  1.25669774s
  b-deduce-proj-root: 233.292086ms
              b-gmal:  17.279564ms
         select-atom:    381.247µs
             satisfy:    276.092µs
            new-atom:    124.264µs
         select-root:     57.709µs
               other:      7.003µs

  TOTAL: 5.853566533s


Solver wall times by segment:

-- vet --

vet: /go/src/foo/bar/main.go:4:2: could not import github.com/Sirupsen/logrus (can't find import: foo/vendor/github.com/Sirupsen/logrus)
Checking file /go/src/foo/bar/main.go

dep_issue.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions