summary refs log tree commit diff
diff options
context:
space:
mode:
authorryneeverett <ryneeverett@gmail.com>2020-03-27 15:38:16 +0000
committerryneeverett <ryneeverett@gmail.com>2020-03-27 16:19:54 +0000
commit25fea4538e475fdec31ff7692778ff315059efb3 (patch)
treec878327d00f740af690f21279e79d94767370d58
parent7cc024b59e03b33de0a073f9205f47dc18029bde (diff)
downloadnixpkgs-25fea4538e475fdec31ff7692778ff315059efb3.tar
nixpkgs-25fea4538e475fdec31ff7692778ff315059efb3.tar.gz
nixpkgs-25fea4538e475fdec31ff7692778ff315059efb3.tar.bz2
nixpkgs-25fea4538e475fdec31ff7692778ff315059efb3.tar.lz
nixpkgs-25fea4538e475fdec31ff7692778ff315059efb3.tar.xz
nixpkgs-25fea4538e475fdec31ff7692778ff315059efb3.tar.zst
nixpkgs-25fea4538e475fdec31ff7692778ff315059efb3.zip
vimPlugins: Store deprecation date.
-rw-r--r--pkgs/misc/vim-plugins/aliases.nix4
-rw-r--r--pkgs/misc/vim-plugins/deprecated.json20
-rwxr-xr-xpkgs/misc/vim-plugins/update.py6
3 files changed, 23 insertions, 7 deletions
diff --git a/pkgs/misc/vim-plugins/aliases.nix b/pkgs/misc/vim-plugins/aliases.nix
index 645b8db7db4..74061dcfd58 100644
--- a/pkgs/misc/vim-plugins/aliases.nix
+++ b/pkgs/misc/vim-plugins/aliases.nix
@@ -31,8 +31,8 @@ let
                               (checkInPkgs n alias)))
                      aliases;
 
-  deprecations = lib.mapAttrs (old: new:
-    throw "${old} was renamed to ${new}. Please update to ${new}."
+  deprecations = lib.mapAttrs (old: info:
+    throw "${old} was renamed to ${info.new} on ${info.date}. Please update to ${info.new}."
   ) (builtins.fromJSON (builtins.readFile ./deprecated.json));
 
 in
diff --git a/pkgs/misc/vim-plugins/deprecated.json b/pkgs/misc/vim-plugins/deprecated.json
index bb4ad18c3ec..2c02982f6c6 100644
--- a/pkgs/misc/vim-plugins/deprecated.json
+++ b/pkgs/misc/vim-plugins/deprecated.json
@@ -1,6 +1,18 @@
 {
-    "gist-vim": "vim-gist",
-    "vim-jade": "vim-pug",
-    "vundle": "Vundle.vim",
-    "youcompleteme": "YouCompleteMe"
+    "gist-vim": {
+        "date": "2020-03-27",
+        "new": "vim-gist"
+    },
+    "vim-jade": {
+        "date": "2020-03-27",
+        "new": "vim-pug"
+    },
+    "vundle": {
+        "date": "2020-03-27",
+        "new": "Vundle.vim"
+    },
+    "youcompleteme": {
+        "date": "2020-03-27",
+        "new": "YouCompleteMe"
+    }
 }
\ No newline at end of file
diff --git a/pkgs/misc/vim-plugins/update.py b/pkgs/misc/vim-plugins/update.py
index d513669d0f3..bbeef0889f4 100755
--- a/pkgs/misc/vim-plugins/update.py
+++ b/pkgs/misc/vim-plugins/update.py
@@ -420,13 +420,17 @@ def rewrite_input(input_file: Path, output_file: Path, redirects: dict):
     if redirects:
         lines = [redirects.get(line, line) for line in lines]
 
+        cur_date_iso = datetime.now().strftime("%Y-%m-%d")
         with open(DEPRECATED, "r") as f:
             deprecations = json.load(f)
         for old, new in redirects.items():
             old_name = old.split("/")[1].split(" ")[0].strip("\n")
             new_name = new.split("/")[1].split(" ")[0].strip("\n")
             if old_name != new_name:
-                deprecations[old_name] = new_name
+                deprecations[old_name] = {
+                    "new": new_name,
+                    "date": cur_date_iso,
+                }
         with open(DEPRECATED, "w") as f:
             json.dump(deprecations, f, indent=4, sort_keys=True)