-
-
Notifications
You must be signed in to change notification settings - Fork 372
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
goimports: provide own goimports #158
Comments
The original When you say, "slightly more accurate", do you mean this |
It would have access to the whole package, yes. I was also thinking of the situation where you have two packages called |
This is no longer relevant. We've given up on our index ideas and chosen a much simpler caching based approach, which goimports won't benefit from. We're not working on a language server anymore, either. |
Given our efforts on caching/indexing type information, we can provide a much faster, and slightly more accurate, goimports. This would primarily be of interest as part of the Language Server efforts (as the LS is guaranteed to have an up to date index at all times), but could be useful standalone, too.
The standalone version would have to ensure that the index is up to date. Specifics TBD.
There are two separate ways we can provide our own goimports
Simply provide a virtual go/build.Context for the original goimports to use. This context would use our cache.
Write our own goimports from scratch that queries the index directly. This would likely be faster than the first approach. It would also be necessary for implementing more accurate (i.e. more type aware) package selection.
The text was updated successfully, but these errors were encountered: