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/api: allow use with external packages #4993

Closed
bamiaux opened this issue Mar 6, 2013 · 11 comments
Closed

cmd/api: allow use with external packages #4993

bamiaux opened this issue Mar 6, 2013 · 11 comments
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@bamiaux
Copy link

bamiaux commented Mar 6, 2013

I'd like to be able to use go tool api on external packages and not just with the
standard go libray.
Something like 'go tool api ...mypackage' which generates a text file containing
mypackage public api.
This would be useful to prevent unecessary API breakage.
@rsc
Copy link
Contributor

rsc commented Mar 6, 2013

Comment 1:

Sounds reasonable but I think it's too late for Go 1.1.

Labels changed: added priority-later, removed priority-triage, go1.1maybe.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 2:

Labels changed: added go1.2maybe, suggested.

@robpike
Copy link
Contributor

robpike commented Aug 19, 2013

Comment 3:

Unlikely to happen in Go1.2

Labels changed: added go1.3maybe, removed go1.2maybe.

@robpike
Copy link
Contributor

robpike commented Aug 20, 2013

Comment 4:

Labels changed: removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 5:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 6:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 7:

Labels changed: added repo-main.

@gopherbot
Copy link

Comment 8 by vbatts:

Attached is a patch that enables this, and does not break current usage of the tool.
It adds a -gopath flag to enable searching of GOPATH.
While it could list all the api found in GOPATH with no additional arguments, the walker
finds source that have errors (typechecking, etc). So the best use case for specific
searches of a package (i.e. `api -gopath github.com/me/hotpackage`)
This patch is based on 18815:21fb28e644a1 tip, and uses
https://golang.org/issue/7103 to be able to build cmd/api

Attachments:

  1. cmd-api_includeGopath.patch (3353 bytes)

@bamiaux bamiaux added accepted Suggested Issues that may be good for new contributors looking for work to do. labels Jan 11, 2014
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@dmitshur
Copy link
Contributor

I'd like this too.

@dmitshur
Copy link
Contributor

I can confirm the patch by @vbatts still works. There was one merge conflict (related to #7103 being already merged in), but it was harmless.

@bradfitz
Copy link
Contributor

Dup of #13030 (x/build/cmd/release: do not ship cmd/api binary)

That is now fixed, meaning we no longer ship the api tool. It's our internal detail only.

@golang golang locked and limited conversation to collaborators Nov 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

6 participants