Skip to content
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

cmd/go: list {{.Stale}} was not updated for the change to install #24558

Closed
ianlancetaylor opened this issue Mar 27, 2018 · 9 comments
Closed
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@ianlancetaylor
Copy link
Contributor

In Go 1.10 we changed go install so that it only installs the named package. The docs for go list -f {{.Stale}} say that it means "would 'go install' do anything for this package?". But

> go install golang.org/x/tools/cmd/present
> go list -f '{{.Stale}} {{.StaleReason}}' golang.org/x/tools/cmd/present
true stale dependency: golang.org/x/tools/godoc/static

As we can see, even though go install will not do anything, {{.Stale}} reports that the package is stale.

Setting milestone to 1.10.1 since this is a regression in 1.10.

CC @rsc

@ianlancetaylor ianlancetaylor added the NeedsFix The path to resolution is known, but the work has not been done. label Mar 27, 2018
@ianlancetaylor ianlancetaylor added this to the Go1.10.1 milestone Mar 27, 2018
@rsc
Copy link
Contributor

rsc commented Mar 27, 2018

I'm not convinced this is a regression. The docs may need updating instead. Is there a larger example that is broken by this behavior?

@ianlancetaylor
Copy link
Contributor Author

See #24396, where the mobile tooling wants to know whether a program is up to date. My suggestion was that go list -f '{{.Stale}}' should report that. Although that used to work in older releases, it no longer does, unless (I assume) you use go install -i. I don't see any particular reason it ought to work that way.

@eliasnaur
Copy link
Contributor

Possible dup of #23818 and #23797.

@ysmolski
Copy link
Member

@rsc, the example may be the test I have tried to fix: https://go-review.googlesource.com/c/go/+/103675
I had to pass "-i" to install to get rid of stale message to pass the test.
Does it look right?

@eliasnaur
Copy link
Contributor

@rsc do you think this can be resolved before the 1.11 window closes?

@rsc
Copy link
Contributor

rsc commented Apr 18, 2018

Started work on this.

@gopherbot
Copy link

Change https://golang.org/cl/107957 mentions this issue: cmd/go: fix go list .Stale computation

@FiloSottile
Copy link
Contributor

@gopherbot please file this for backport against 1.10. This might be considered a regression (see discussion).

@FiloSottile FiloSottile modified the milestones: Go1.10.2, Go1.11 Apr 23, 2018
@gopherbot
Copy link

Backport issue(s) opened: #25026 (for 1.10).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

7 participants