-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
:GoBuild is slower than expected when rebuilding binaries #2245
Comments
vim-go purposefully builds the package of the current file and the
It might be possible to build to |
I guess I'm not so much worried about that as I am about it being a fast operation... is there no way to get go build to be fast without producing an artifact? My understanding was each library builds a |
That's not a decision that's up to vim-go. I agree that it would be optimal. Have you checked to see whether there's an issue for this on github.com/golang/go? |
Filed golang/go#31710. |
I experimented with using I don't think there's anything we can do to improve the situation, but I'm open to ideas or any data that shows that my assessment is wrong. |
Given that there's a Go issue for this now, I'm going to leave this open so that we can track the linked Go issue and improve vim-go if/when the enhancement is made in Go. |
when i use GoRun, sometimes vim did not respond and began hang, in this situation, i had to kill vim process and reopen a new vim process, what is the problem. |
If I compile a file that has no changes to the file contents or dependencies using
:GoBuild
, I would expect it to take advantage of the build cache from the last time it compiled. Instead,vim-go
issuesgo build -tags '' . errors
from the directory of the file I am attempting to compile. This command never takes advantage of the build cache - it takes 4 seconds for the package I am trying to compile.By contrast,
:GoInstall
does take advantage of the build cache. It seems like it is strictly better to use than:GoBuild
. Even if you replaced:GoBuild
with:GoInstall
followed byrm -rf
of the created artifacts, it seems like it would be faster than "go build."The text was updated successfully, but these errors were encountered: