You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: