vimPlugins: Automatic rename deprecations

When an updated redirect results in a package name change, not just an
owner change, throw an error to warn users the package names has
changed.
This commit is contained in:
ryneeverett
2020-03-27 15:30:54 +00:00
parent b886ad90e7
commit 7cc024b59e
3 changed files with 27 additions and 17 deletions
+6 -9
View File
@@ -31,11 +31,12 @@ let
(checkInPkgs n alias)))
aliases;
deprecateName = oldName: newName:
throw "${oldName} was renamed to ${newName}. Please update to ${newName}.";
in
deprecations = lib.mapAttrs (old: new:
throw "${old} was renamed to ${new}. Please update to ${new}."
) (builtins.fromJSON (builtins.readFile ./deprecated.json));
mapAliases {
in
mapAliases ({
airline = vim-airline;
alternative = a-vim; # backwards compat, added 2014-10-21
bats = bats-vim;
@@ -71,7 +72,6 @@ mapAliases {
ghcmod = ghcmod-vim;
goyo = goyo-vim;
Gist = vim-gist;
gist-vim = deprecateName "vim-gist" "gist-vim"; # backwards compat, added 2020-3-22
gitgutter = vim-gitgutter;
gundo = gundo-vim;
Gundo = gundo-vim; # backwards compat, added 2015-10-03
@@ -129,17 +129,14 @@ mapAliases {
unite = unite-vim;
UltiSnips = ultisnips;
vim-addon-vim2nix = vim2nix;
vim-jade = deprecateName "vim-pug" "vim-jade"; # backwards compat, added 2020-3-22
vimproc = vimproc-vim;
vimshell = vimshell-vim;
vinegar = vim-vinegar;
vundle = deprecateName "Vundle-vim" "vundle"; # backwards compat, added 2020-3-22
watchdogs = vim-watchdogs;
WebAPI = webapi-vim;
wombat256 = wombat256-vim; # backwards compat, added 2015-7-8
yankring = YankRing-vim;
Yankring = YankRing-vim;
youcompleteme = deprecateName "YouCompleteMe" "youcompleteme"; # backwards compat, added 2020-3-22
xterm-color-table = xterm-color-table-vim;
zeavim = zeavim-vim;
}
} // deprecations)