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

stringer typewriter gets its export data from installed packages instead of source #90

Open
michaelsmanley opened this issue Jul 13, 2015 · 1 comment

Comments

@michaelsmanley
Copy link

Something I ran into today when generating code in a package whose exported declarations had changed between the version that was installed and the version that was being worked on.

golang/go#9702

Basically, if you read to the end, the tools authors expect people to use golang.org/x/tools/go/loader to get exported declarations from source.

The stringer tool itself has this same issue. It is a kind-of edge case, but for people using generators in actively-developed codebases, you can end up in a chicken-or-egg problem where you have to be able to install a package before you can run the generators on it.

@ibigpapa
Copy link

ibigpapa commented Feb 1, 2018

still an issue in go 1.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants