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

go/importer: API lacks necessary features of (deprecated) golang.org/x/tools/go/importer #13222

Closed
alandonovan opened this issue Nov 12, 2015 · 4 comments
Milestone

Comments

@alandonovan
Copy link
Contributor

A number of users have asked how they can load type information from the export data section of a .a file produced by the Go compiler. Although you can use the standard go/importer package to find (relative to $GOPATH) and load a .a file, it provides no way to load a file that lives elsewhere. In contrast, the old API separated the operations of FindPkg and Import.

The new package should provide these features too, as users are currently forced to fork either the deprecated x/tools package or the standard go/internal/gcimporter package.

@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Nov 12, 2015
@griesemer griesemer modified the milestones: Go1.9Maybe, Unplanned Nov 22, 2016
@griesemer
Copy link
Contributor

Too late for 1.9.

@griesemer griesemer modified the milestones: Go1.10, Go1.9Maybe Jun 16, 2017
@griesemer
Copy link
Contributor

@alandonovan Isn't this a duplicate of #13847?

@alandonovan
Copy link
Contributor Author

Yes, that issue could subsume this one.

The Lookup function isn't fully specified yet. Either it should return the name of a .a file for a given package, or it should return a reader for the specific exportdata section within the file. The latter is more flexible but puts the burden of parsing .a files onto the client. I suspect some clients will continue to need the full generality of the golang.org/x/tools/gcexportdata API.

@griesemer
Copy link
Contributor

Closed as duplicate of #13847.

@golang golang locked and limited conversation to collaborators Aug 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants