plugins/none-ls: Switch from assertions to warnings for none-ls tools maintenance (#1285)

This commit is contained in:
Gaétan Lepage 2024-03-18 10:36:35 +01:00 committed by GitHub
parent 939530edca
commit a1636f620f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -299,7 +299,7 @@ in {
mkIf cfg.enable { mkIf cfg.enable {
# ASSERTIONS FOR DEVELOPMENT PURPOSES: Any failure should be caught by CI before deployment. # ASSERTIONS FOR DEVELOPMENT PURPOSES: Any failure should be caught by CI before deployment.
# Ensure that the keys of the manually declared `builtinPackages` match the ones from upstream. # Ensure that the keys of the manually declared `builtinPackages` match the ones from upstream.
assertions = let warnings = let
upstreamToolNames = unique ( upstreamToolNames = unique (
flatten flatten
( (
@ -321,22 +321,23 @@ in {
# Keep tool names which are not in upstream # Keep tool names which are not in upstream
(toolName: !(elem toolName upstreamToolNames)) (toolName: !(elem toolName upstreamToolNames))
localToolNames; localToolNames;
in [ in
{ (
assertion = (length undeclaredToolNames) == 0; optional
message = '' ((length undeclaredToolNames) > 0)
Nixvim (plugins.none-ls): Some tools from upstream are not declared locally in `builtinPackages`. ''
[DEV] Nixvim (plugins.none-ls): Some tools from upstream are not declared locally in `builtinPackages`.
-> [${concatStringsSep ", " undeclaredToolNames}] -> [${concatStringsSep ", " undeclaredToolNames}]
''; ''
} )
{ ++ (
assertion = (length uselesslyDeclaredToolNames) == 0; optional
message = '' ((length uselesslyDeclaredToolNames) > 0)
Nixvim (plugins.none-ls): Some tools are declared locally but are not in the upstream list of supported plugins. ''
[DEV] Nixvim (plugins.none-ls): Some tools are declared locally but are not in the upstream list of supported plugins.
-> [${concatStringsSep ", " uselesslyDeclaredToolNames}] -> [${concatStringsSep ", " uselesslyDeclaredToolNames}]
''; ''
} );
];
plugins.none-ls.sourcesItems = plugins.none-ls.sourcesItems =
builtins.map ( builtins.map (