Add config to exclude certain binaries from updating#3668
Add config to exclude certain binaries from updating#3668EVODelavega wants to merge 3 commits intofatih:masterfrom
Conversation
Signed-off-by: Elias Van Ootegem <elias@vega.xyz>
b7992b3 to
4c6513e
Compare
|
Thank you for contributing again. With this change, it looks like I'm open to this change conceptually, but I believe users should be able to update a tool that's given as an explicit argument. WDYT? |
|
Hi, and yes. As it stands, the Thanks for the feedback. |
Signed-off-by: Elias Van Ootegem <elias@vega.xyz>
Signed-off-by: Elias Van Ootegem <elias@vega.xyz>
| " specified. | ||
| for l:bin in go#config#GoExcludeBinaries() | ||
| call remove(l:bin, l:packages) | ||
| endfor |
There was a problem hiding this comment.
l:packages needs to copy s:packages (use the copy or deepcopy) since entries are being removed so that s:packages is not altered.
Also, :GoInstallBinaries should probably not skip anything that's missing. I think that means that instead of this removal, the check around line 160 that currently reads
if a:updateBinaries == 1
echo "vim-go: Updating " . l:binary . ". Reinstalling ". importPath . " to folder " . go_bin_path
should probably be something like
if a:updateBinaries == 1
if index(go#config#GoExcludeBinaries(), l:bin) != -1
echo "vim-go: Skipping out of date " . l:binary . ". "
continue
endif
echo "vim-go: Updating " . l:binary . ". Reinstalling ". importPath . " to folder " . go_bin_path
The only way to skip (or set a specific version) for the binaries installed via
:GoInstallBinariesor:GoUpdateBinariesso far is to pass in a specific version. This works, but is somewhat clunky. Projects I'm working often use a specific version ofgolangci-lintas part of the CI. Instead of having to create mappings, or keep track of which versions and run the correct:GoUpdateBinaries golangci-lint@v1.2.3, I figured it'd be much easier to let me manage the version of that binary myself, and have:GoUpdateBinariesskip installing/updating that binary outright.Another gripe I have with passing in specific versions of a binary is that, in order to skip one of the binaries, I'd need to list all of the binaries I do want to update (or update all, and then revert one to a specific version). IMHO, adding an exclude list is a much simpler solution, hence the PR.
When adding the docs for this new config variable, I also noticed a small typo in the docs for
g:go_debug_breakpoint_sign_text.