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: missing 'go install path@version' hint in 'go install path' (without version) error #42638

Closed
bcmills opened this issue Nov 16, 2020 · 2 comments
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done. okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 release-blocker
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Nov 16, 2020

~$ gotip version
go version devel +f2eea4c1d Mon Nov 16 08:22:10 2020 +0000 linux/amd64

~$ gotip install golang.org/dl/go1.9.7
no required module provides package golang.org/dl/go1.9.7: working directory is not part of a module

~$ gotip install golang.org/dl/go1.9.7@latest

~$

The error message from the first go install invocation should have suggested the @latest suffix, since the two commands are semantically very close and the suffix is relatively easy to forget. (See also #42087.)

Marking as release-blocker for Go 1.16 since this is a potential usability issue for #40276.

CC @jayconrod @matloob

@bcmills bcmills added NeedsFix The path to resolution is known, but the work has not been done. release-blocker modules okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 labels Nov 16, 2020
@bcmills bcmills added this to the Go1.16 milestone Nov 16, 2020
@gopherbot
Copy link

Change https://golang.org/cl/277354 mentions this issue: cmd/go: refactor error reporting in internal/load

@gopherbot
Copy link

Change https://golang.org/cl/277355 mentions this issue: cmd/go: print hint when 'go install' run without version outside module

gopherbot pushed a commit that referenced this issue Dec 14, 2020
Replaced load.PackagesForBuild with a new function,
load.CheckPackageErrors. Callers should now call PackagesAndErrors,
then CheckPackageErrors for the same functionality.

Removed load.Packages. Callers should call base.Errorf and filter the
package list as needed.

This gives callers more flexibility in handling package load errors.

For #42638

Change-Id: Id75463ba695adc1ca3f8693ceb2c8978b74a3500
Reviewed-on: https://go-review.googlesource.com/c/go/+/277354
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
@golang golang locked and limited conversation to collaborators Dec 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done. okay-after-beta1 Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1 release-blocker
Projects
None yet
Development

No branches or pull requests

3 participants