New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`govendor update thepackage/...` and all it's dependencies? #138

Open
slimsag opened this Issue Apr 25, 2016 · 17 comments

Comments

Projects
None yet
7 participants
@slimsag

slimsag commented Apr 25, 2016

I've searched and searched through the README.md and the FAQ, but was surprised that there is not an answer for this use case given that it seems like it would be extremely common.

The use case: I have a package thepackage which has a huge amount of dependencies (more than I can / want to track by hand). I vendor that package, and now I want to update that package and it's all of it's dependencies.

I've found govendor update thepackage/... updates thepackage and all packages that are under thepackage

But how can you ask govendor to also update any dependencies that thepackage references?

@kardianos

This comment has been minimized.

Show comment
Hide comment
@kardianos

kardianos Apr 25, 2016

Owner

Use fetch

On Mon, Apr 25, 2016, 16:43 Stephen Gutekanst notifications@github.com
wrote:

I've searched and searched through the README.md and the FAQ, but was
surprised that there is not an answer for this use case given that it seems
like it would be extremely common.

The use case: I have a package thepackage which has a huge amount of
dependencies (more than I can / want to track by hand). I vendor that
package, and now I want to update that package and it's all of it's
dependencies.

I've found govendor update thepackage/... updates thepackage and all
packages that are under thepackage

But how can you ask govendor to also update any dependencies that
thepackage references?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#138

Owner

kardianos commented Apr 25, 2016

Use fetch

On Mon, Apr 25, 2016, 16:43 Stephen Gutekanst notifications@github.com
wrote:

I've searched and searched through the README.md and the FAQ, but was
surprised that there is not an answer for this use case given that it seems
like it would be extremely common.

The use case: I have a package thepackage which has a huge amount of
dependencies (more than I can / want to track by hand). I vendor that
package, and now I want to update that package and it's all of it's
dependencies.

I've found govendor update thepackage/... updates thepackage and all
packages that are under thepackage

But how can you ask govendor to also update any dependencies that
thepackage references?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#138

@kardianos

This comment has been minimized.

Show comment
Hide comment
@kardianos

kardianos Apr 25, 2016

Owner

Actually, I'm not sure but I'll check.

On Mon, Apr 25, 2016, 16:51 Daniel Theophanes kardianos@gmail.com wrote:

Use fetch

On Mon, Apr 25, 2016, 16:43 Stephen Gutekanst notifications@github.com
wrote:

I've searched and searched through the README.md and the FAQ, but was
surprised that there is not an answer for this use case given that it seems
like it would be extremely common.

The use case: I have a package thepackage which has a huge amount of
dependencies (more than I can / want to track by hand). I vendor that
package, and now I want to update that package and it's all of it's
dependencies.

I've found govendor update thepackage/... updates thepackage and all
packages that are under thepackage

But how can you ask govendor to also update any dependencies that
thepackage references?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#138

Owner

kardianos commented Apr 25, 2016

Actually, I'm not sure but I'll check.

On Mon, Apr 25, 2016, 16:51 Daniel Theophanes kardianos@gmail.com wrote:

Use fetch

On Mon, Apr 25, 2016, 16:43 Stephen Gutekanst notifications@github.com
wrote:

I've searched and searched through the README.md and the FAQ, but was
surprised that there is not an answer for this use case given that it seems
like it would be extremely common.

The use case: I have a package thepackage which has a huge amount of
dependencies (more than I can / want to track by hand). I vendor that
package, and now I want to update that package and it's all of it's
dependencies.

I've found govendor update thepackage/... updates thepackage and all
packages that are under thepackage

But how can you ask govendor to also update any dependencies that
thepackage references?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#138

@slimsag

This comment has been minimized.

Show comment
Hide comment
@slimsag

slimsag Apr 26, 2016

Thanks @kardianos -- I tried just now with the +external flag but to no avail:

$ govendor fetch -v +external sourcegraph.com/sourcegraph/appdash/...
Get latest revision "sourcegraph.com/sourcegraph/appdash"
Get latest revision "sourcegraph.com/sourcegraph/appdash/httptrace"
Get latest revision "sourcegraph.com/sourcegraph/appdash/internal/wire"
Get latest revision "sourcegraph.com/sourcegraph/appdash/sqltrace"
Get latest revision "sourcegraph.com/sourcegraph/appdash/traceapp"
Get latest revision "sourcegraph.com/sourcegraph/appdash/traceapp/tmpl"

Likewise git status shows it only updated packages under the given import path filter, not any others.

It would be nice if it could be done with update instead of fetch too, because hitting the network for updates is not always desirable (I know the versions in my $GOPATH are right, but not certain the latest remote versions are right).

slimsag commented Apr 26, 2016

Thanks @kardianos -- I tried just now with the +external flag but to no avail:

$ govendor fetch -v +external sourcegraph.com/sourcegraph/appdash/...
Get latest revision "sourcegraph.com/sourcegraph/appdash"
Get latest revision "sourcegraph.com/sourcegraph/appdash/httptrace"
Get latest revision "sourcegraph.com/sourcegraph/appdash/internal/wire"
Get latest revision "sourcegraph.com/sourcegraph/appdash/sqltrace"
Get latest revision "sourcegraph.com/sourcegraph/appdash/traceapp"
Get latest revision "sourcegraph.com/sourcegraph/appdash/traceapp/tmpl"

Likewise git status shows it only updated packages under the given import path filter, not any others.

It would be nice if it could be done with update instead of fetch too, because hitting the network for updates is not always desirable (I know the versions in my $GOPATH are right, but not certain the latest remote versions are right).

@kardianos kardianos added bug enhancement and removed bug labels Apr 30, 2016

@kardianos

This comment has been minimized.

Show comment
Hide comment
@kardianos

kardianos May 4, 2016

Owner

@slimsag oh, I know why fetch did not get latest for all deps in this case, they were already in GOPATH or vendor folder and they were not explicitly specified.

It looks like I need an argument to declare update/add/fetch for this package AND all it's (non-stdlib) dependencies. This feature has been requested several times by various people recently.

Owner

kardianos commented May 4, 2016

@slimsag oh, I know why fetch did not get latest for all deps in this case, they were already in GOPATH or vendor folder and they were not explicitly specified.

It looks like I need an argument to declare update/add/fetch for this package AND all it's (non-stdlib) dependencies. This feature has been requested several times by various people recently.

@slimsag

This comment has been minimized.

Show comment
Hide comment
@slimsag

slimsag May 4, 2016

Yep that sounds like it would do the trick exactly!
On May 3, 2016 5:34 PM, "Daniel Theophanes" notifications@github.com
wrote:

@slimsag https://github.com/slimsag oh, I know why fetch did not get
latest for all deps in this case, they were already in GOPATH or vendor
folder and they were not explicitly specified.

It looks like I need an argument to declare update/add/fetch for this
package AND all it's (non-stdlib) dependencies. This feature has been
requested several times by various people recently.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#138 (comment)

slimsag commented May 4, 2016

Yep that sounds like it would do the trick exactly!
On May 3, 2016 5:34 PM, "Daniel Theophanes" notifications@github.com
wrote:

@slimsag https://github.com/slimsag oh, I know why fetch did not get
latest for all deps in this case, they were already in GOPATH or vendor
folder and they were not explicitly specified.

It looks like I need an argument to declare update/add/fetch for this
package AND all it's (non-stdlib) dependencies. This feature has been
requested several times by various people recently.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#138 (comment)

@kardianos kardianos added the scheduled label May 4, 2016

@kardianos

This comment has been minimized.

Show comment
Hide comment
@kardianos

kardianos May 11, 2016

Owner

Proposal:
In the update, add, remove, and fetch sub-commands, add the flag "-R" to recursively perform the action on all that packages deps to. For remove, it would only remove the packages that are not referenced elsewhere.

Owner

kardianos commented May 11, 2016

Proposal:
In the update, add, remove, and fetch sub-commands, add the flag "-R" to recursively perform the action on all that packages deps to. For remove, it would only remove the packages that are not referenced elsewhere.

@kaedys

This comment has been minimized.

Show comment
Hide comment
@kaedys

kaedys Jun 3, 2016

For remove, it would only remove the packages that are not referenced elsewhere.

Further, make sure this works with govendor remove -R +unused, to recursively remove all unused packages, and then any packages that are now unused with their removal, and so on, until the only packages that are remaining are those explicitly used by the root repo, or packages those reference. Basically works as a "clean up my /vendor" command.

kaedys commented Jun 3, 2016

For remove, it would only remove the packages that are not referenced elsewhere.

Further, make sure this works with govendor remove -R +unused, to recursively remove all unused packages, and then any packages that are now unused with their removal, and so on, until the only packages that are remaining are those explicitly used by the root repo, or packages those reference. Basically works as a "clean up my /vendor" command.

@kardianos

This comment has been minimized.

Show comment
Hide comment
@kardianos

kardianos Jun 3, 2016

Owner

@kaedys Good point. I can add a test for that too.

Owner

kardianos commented Jun 3, 2016

@kaedys Good point. I can add a test for that too.

@timoreimann

This comment has been minimized.

Show comment
Hide comment
@timoreimann

timoreimann Jul 3, 2016

@kardianos any update on this one? It's likely the one key feature missing to me. Would love to have it!

timoreimann commented Jul 3, 2016

@kardianos any update on this one? It's likely the one key feature missing to me. Would love to have it!

@kardianos

This comment has been minimized.

Show comment
Hide comment
@kardianos

kardianos Jul 3, 2016

Owner

Not yet. This last month I've had other activities on my plate. It looks like most of them are taken care of so I can focus on this soon.

Owner

kardianos commented Jul 3, 2016

Not yet. This last month I've had other activities on my plate. It looks like most of them are taken care of so I can focus on this soon.

@timoreimann

This comment has been minimized.

Show comment
Hide comment
@timoreimann

timoreimann Jul 3, 2016

Sounds promising. Appreciate the update!

timoreimann commented Jul 3, 2016

Sounds promising. Appreciate the update!

@timoreimann

This comment has been minimized.

Show comment
Hide comment
@timoreimann

timoreimann Mar 21, 2017

It's been a while. :-) Is there still a chance for this feature being implemented?

I can imagine the prospected, long-term shift towards golang/dep may have changed plans somehow?

timoreimann commented Mar 21, 2017

It's been a while. :-) Is there still a chance for this feature being implemented?

I can imagine the prospected, long-term shift towards golang/dep may have changed plans somehow?

@kardianos

This comment has been minimized.

Show comment
Hide comment
@kardianos

kardianos Mar 22, 2017

Owner

No, just lack of time. Been busy at work / home. Sorry. I try to keep up with PRs, but haven't spent too much time on features.

Owner

kardianos commented Mar 22, 2017

No, just lack of time. Been busy at work / home. Sorry. I try to keep up with PRs, but haven't spent too much time on features.

@glasser

This comment has been minimized.

Show comment
Hide comment
@glasser

glasser May 16, 2017

Does anyone have a workaround for this?

glasser commented May 16, 2017

Does anyone have a workaround for this?

@slimsag

This comment has been minimized.

Show comment
Hide comment
@slimsag

slimsag May 17, 2017

The workaround I have is to find all the dependencies of your package (manually, or via starting with a clean GOPATH and go get'ing it, or via go list + filtering) and then running govendor update thepackage/... for each one AFAIK.

slimsag commented May 17, 2017

The workaround I have is to find all the dependencies of your package (manually, or via starting with a clean GOPATH and go get'ing it, or via go list + filtering) and then running govendor update thepackage/... for each one AFAIK.

@BugDiver

This comment has been minimized.

Show comment
Hide comment
@BugDiver

BugDiver Sep 4, 2017

govendor update ./... adds local packages as dependencies which create problems. Any idea how to avoid this?

BugDiver commented Sep 4, 2017

govendor update ./... adds local packages as dependencies which create problems. Any idea how to avoid this?

@wangming1993

This comment has been minimized.

Show comment
Hide comment
@wangming1993

wangming1993 commented Oct 17, 2017

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment