1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-21 17:59:41 +01:00

lib/evalNixvim: deprecate specialArgs.helpers

This has been soft-deprecated for several releases. Now that we have
removed our internal usage, we can introduce an eval warning.
This commit is contained in:
Matt Sturgeon 2025-11-19 11:48:12 +00:00
parent dad19c1238
commit 82bc02466c
3 changed files with 9 additions and 2 deletions

View file

@ -48,8 +48,12 @@ in
# however see https://github.com/nix-community/nixvim/issues/2879
inherit lib;
modulesPath = ../modules;
# TODO: deprecate `helpers`
helpers = self;
# TODO: deprecated 2025-11-19
helpers = lib.warn ''
nixvim: the `helpers` module arg has been renamed to `lib.nixvim`.
Nixvim modules can access this via the `lib` module arg.
For wrapper modules (e.g. NixOS or Home Manager modules), see:
https://nix-community.github.io/nixvim/lib/nixvim/index.html#accessing-nixvims-functions'' self;
}
// extraSpecialArgs;
};

View file

@ -20,6 +20,7 @@ let
message = "Expected lib.nixvim.enableExceptInTests to be true";
}
{
# NOTE: evaluating `helpers` here prints an eval warning
assertion = !helpers.enableExceptInTests;
message = "Expected helpers.enableExceptInTests to be false";
}
@ -40,6 +41,7 @@ let
message = "Expected lib.nixvim.enableExceptInTests to be true";
}
{
# NOTE: evaluating `helpers` here prints an eval warning
assertion = helpers.enableExceptInTests;
message = "Expected helpers.enableExceptInTests to be true";
}

View file

@ -8,6 +8,7 @@ let
message = "lib.nixvim should be defined";
}
{
# NOTE: evaluating `helpers` here prints an eval warning
assertion = builtins.attrNames lib.nixvim == builtins.attrNames helpers;
message = "lib.nixvim and helpers should be aliases";
}