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.

packages are missing #674

@aviau

Description

@aviau

Hello!

There are missing packages when I use dep init, then dep ensure and try to build.

Here is how to reproduce:

Create test.go:

package test

import (
  "testing"
  "github.com/stretchr/testify/assert"
)

func TestSomething(t *testing.T) {

  var a string = "Hello"
  var b string = "Hello"

  assert.Equal(t, a, b, "The two words should be the same.")

}

Build it...

aviau@cranberry:~/go/src/github.com/lanets/test$ go build ./...
aviau@cranberry:~/go/src/github.com/lanets/test$ 

That works!

Now lets vendor my deps:

aviau@cranberry:~/go/src/github.com/lanets/test$ dep init
Searching GOPATH for projects...
  Using master as constraint for direct dep github.com/stretchr/testify
  Locking in master (4d4bfba) for direct dep github.com/stretchr/testify
  Locking in v1.1.0 (346938d) for transitive dep github.com/davecgh/go-spew
Following dependencies were not found in GOPATH. Dep will use the most recent versions of these projects.
  github.com/pmezard/go-difflib
aviau@cranberry:~/go/src/github.com/lanets/test$ dep ensure

and build...

aviau@cranberry:~/go/src/github.com/lanets/test$ go build ./...
vendor/github.com/stretchr/testify/mock/mock.go:14:2: cannot find package "github.com/stretchr/objx" in any of:
	/home/aviau/go/src/github.com/lanets/test/vendor/github.com/stretchr/objx (vendor tree)
	/usr/lib/go-1.7/src/github.com/stretchr/objx (from $GOROOT)
	/home/aviau/go/src/github.com/stretchr/objx (from $GOPATH)
aviau@cranberry:~/go/src/github.com/lanets/test$ 

My Gopkg.toml

[[constraint]]
  name = "github.com/pmezard/go-difflib"
  version = "1.0.0"

[[constraint]]
  branch = "master"
  name = "github.com/stretchr/testify"

Gopkg.lock:

[[projects]]
  name = "github.com/davecgh/go-spew"
  packages = ["spew"]
  revision = "346938d642f2ec3594ed81d874461961cd0faa76"
  version = "v1.1.0"

[[projects]]
  name = "github.com/pmezard/go-difflib"
  packages = ["difflib"]
  revision = "792786c7400a136282c1664665ae0a8db921c6c2"
  version = "v1.0.0"

[[projects]]
  branch = "master"
  name = "github.com/stretchr/testify"
  packages = ["assert"]
  revision = "4d4bfba8f1d1027c4fdbe371823030df51419987"

[solve-meta]
  analyzer-name = "dep"
  analyzer-version = 1
  inputs-digest = "229b117ce0bc14efdd38d21bce5bb75f2ab67db1a949fb886bad21a4be0fc614"
  solver-name = "gps-cdcl"
  solver-version = 1

It looks like go deps is not downloading github.com/stretchr/objx, which it should.

Note that this package looks like its vendored by github.com/stretchr/testify here: https://github.com/stretchr/testify/tree/master/vendor/github.com/stretchr/objx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions