Thanks to visit codestin.com
Credit goes to github.com

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.

"dep ensure pkg@^ver" causing "dep prune" to be undone and corrupts the lock file #640

@ahmetb

Description

@ahmetb

So currently I am in a project where I successfully vended many dependencies and ran dep prune to eliminate unused packages under vendor/.

Now I am trying to add github.com/pkg/errors dependency, so I run:

dep ensure github.com/pkg/errors@^0.8.0

Once this command executes, all unused packages of my already saved dependencies come back, effectively undoing what dep prune did.

At this point I cannot execute "dep prune" anymore as it appears like the lock file is corrupted:

$ dep prune
lock hash doesn't match

At least it did vendor github.com/pkg/errors successfully but millions of lines of code I did not use came back, plus I can't run dep prune anymore. So I rm -rf Gopkg.* vendor/ and start over with dep init.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions