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: 'no such tool "api"' when running 'go tool api' from downloaded tarball #37424

Closed
ronaldpetty opened this issue Feb 24, 2020 · 8 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@ronaldpetty
Copy link

ronaldpetty commented Feb 24, 2020

It seems go tool api was removed at some point. The webpage still exists though, maybe for backward compatibility. If the later is true, should it be updated to explain why it was removed? Not sure if this is the right forum for web related updates.

Tool doesn't exist in 1.13.

$ go version
go version go1.13.8 linux/amd64

$ go tool api
go tool: no such tool "api"

page exists:

user@ubuntu:~/go/src/lab-overview$ curl -LI https://golang.org/cmd/api
HTTP/1.1 301 Moved Permanently
Date: Mon, 24 Feb 2020 20:54:50 GMT
Content-Type: text/html; charset=utf-8
Location: /cmd/api/
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Via: 1.1 google
Transfer-Encoding: chunked
Alt-Svc: quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000

HTTP/1.1 200 OK
Date: Mon, 24 Feb 2020 20:54:50 GMT
Content-Type: text/html; charset=utf-8
Vary: Accept-Encoding
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Via: 1.1 google
Transfer-Encoding: chunked
Alt-Svc: quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000
@ianlancetaylor
Copy link
Contributor

As far as I can tell go tool api exists on tip and in Go 1.13. How did you build your Go installation?

@ronaldpetty
Copy link
Author

ronaldpetty commented Feb 25, 2020 via email

@ALTree
Copy link
Member

ALTree commented Feb 25, 2020

go tool api is not shipped in the pre-compiled binaries we have on the download page, I think you only get it if you build Go from the git repository. See #13030.

@bcmills bcmills changed the title Invalid tool command or web page or both? cmd/go: 'no such tool "api"' when running 'go tool api' from downloaded tarball Feb 26, 2020
@cagedmantis cagedmantis added this to the Backlog milestone Feb 28, 2020
@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 28, 2020
@cagedmantis
Copy link
Contributor

/cc @bcmills @jayconrod

@ronaldpetty
Copy link
Author

Thanks @ALTree , after reading #13030, it seems that removing 'api' from 'go tool' list would make sense if it's only used for internal development. I haven't dug deeper but it sounds like the recommendation was that in 1.6? I am unfamiliar with how the tools are all build/used/exposed; but happy to learn if this makes sense.

@jayconrod
Copy link
Contributor

go tool doesn't have an explicit list of tools: it just checks the pkg/tool/GOOS_GOARCH/ directory.

But why remove it anyway? It doesn't make sense to ship a binary (#13030), but it's still used for building and releasing Go itself.

I checked the versions of Go I have installed (a mix dating back to 1.10): none have a binary api, so I don't think there's been any recent change here.

@ronaldpetty
Copy link
Author

ronaldpetty commented Feb 28, 2020 via email

@jayconrod
Copy link
Contributor

go tool without arguments lists files in the tool directory, so if you had cmd/api installed before, you might have seen that. No need to change that though I think.

@golang golang locked and limited conversation to collaborators Feb 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

6 participants