tools / godep

dependency tool for go
http://godoc.org/github.com/tools/godep
BSD 3-Clause "New" or "Revised" License
5.54k stars 455 forks source link

update a single package #465

Closed yields closed 8 years ago

yields commented 8 years ago
$ godep update github.com/pkg/a 
godep: Package (github.com/pkg/b) not found

I thought that godep update <pkg> will update the given package, but seems like it "checks" all dependencies and errors if a dependency is not found, even though github.com/pkg/a has no dependencies.

Any reason to check them all, is there a workaround to updating a single package?

$ godep version
godep: WARNING: Go version (go1.6) & $GO15VENDOREXPERIMENT= wants to enable the vendor experiment, but disabling because a Godep workspace (Godeps/_workspace) exists
godep v66 (darwin/amd64/go1.6.1)
freeformz commented 8 years ago

The workflow for godep update is to first godep restore, then checkout the version of the package you want to update to, then update.

yields commented 8 years ago

I see, is there a workaround at all?

Seems to me that godep <pkg> should update a single package and it's dependencies and not error if another package does not exists, is there a reason for this workflow that i'm missing?

Would love to work on a fix if you're interested :)

freeformz commented 8 years ago

I agree. I thought there was a test for this, but maybe not.

Sent from my iPhone

On May 12, 2016, at 08:58, Amir Abu Shareb notifications@github.com wrote:

I see, is there a workaround at all?

Seems to me that godep should update a single package and it's dependencies and not error if another package does not exists, is there a reason for this workflow that i'm missing?

Would love to work on a fix if you're interested :)

— You are receiving this because you commented. Reply to this email directly or view it on GitHub