Skip to content

testImports fail to install with glide install and glide.lock present #517

Closed

Description

@sinbad

I have a project which doesn't have any dependencies except for Ginkgo and Gomega for tests. My glide.yaml is (placeholder package_path since this is a private repo):

package: <package_path>
import: []
testImport:
- package: github.com/onsi/ginkgo
  version: ^1.2.0
- package: github.com/onsi/gomega
  version: ^1.0.0

I also have a glide.lock file which is populated with the latest versions from my dev machine.

glide install fails as follows:

> glide --debug install
[DEBUG] Creating vendor
[INFO]  No dependencies found. Nothing installed.
[INFO]  Setting references.
[ERROR] Failed to set version on github.com/onsi/gomega to a78ae492d53aad5a7a232d0d0462c14c400e3ee7: open /go/src/<package_path>/vendor/github.com/onsi/gomega: no such file or directory
[ERROR] Failed to set version on github.com/onsi/ginkgo to 462326b1628e124b23f42e87a8f2750e3c4e2d24: open /go/src/<package_path>/vendor/github.com/onsi/ginkgo: no such file or directory

It appears that it's skipping test dependencies during the download phase but not afterward. I can't find any option to make it download test deps, only --skip-test which seems to be the reverse.

Changing to glide up works, but I believe this is more costly, and I shouldn't have to make my CI build re-scan the dependencies? Bug?

Thanks for a great tool 😄

Activity

  1. prashantv commented on Aug 3, 2016

    @prashantv

    I tried to update a package to use testImport and hit a similar issue,

    [ERROR] Failed to set version on github.com/apache/thrift to bcad91771b7f0bff28a1cac1981d7ef2b9bcef3c: Unable to update checked out version
    
  2. argon commented on Aug 4, 2016

    @argon

    I am seeing this same issue sporadically, I haven't be able to identify the trigger though. Strangely when I check the vendor directory the dependency is both present and set to the correct version

  3. mattfarina commented on Aug 5, 2016

    @mattfarina
    Member

    Does the dependency, currently listed under testImport also show up in non-test code?

    @sinbad thanks for sharing the glide.yaml file. I can use that to try and replicate the problem.

  4. prashantv commented on Aug 5, 2016

    @prashantv

    @mattfarina You can see the full glide.yaml and glide.lock causing failures here:
    yarpc/yab#95

    There is no overlap between the normal imports and test imports:
    https://github.com/yarpc/yab/blob/eaaea58e33966aea27e4d8545131d3fc4b5c3d73/glide.yaml

  5. mattfarina commented on Aug 11, 2016

    @mattfarina
    Member

    There are two separate bugs listed here. One is the case where there are testImports but no imports. The second has to do with something being listed in both imports and testImports.

    Fix coming soon.

  6. added 2 commits that reference this issue on Aug 11, 2016
    0912ed2
    ee9b54d
  7. mattfarina commented on Aug 11, 2016

    @mattfarina
    Member

    Anyone interested can test the fix on #545. If there are no complaints I'll merge on Friday.

  8. added a commit that references this issue on Aug 12, 2016
    3e49dce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址