Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: Move assert in derivation for generated file in the derivation definition #1817

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions flake-modules/updates/efmls-configs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ let

unknownTools = lib.filter (tool: !(lib.hasAttr tool packaged || lib.elem tool unpackaged)) toolList;
in
assert lib.assertMsg (lib.length unknownTools == 0)
"The following tools are neither marked as unpackaged nor as packaged: ${
lib.generators.toPretty { } unknownTools
}";
writeText "efmls-configs-sources.nix" (
assert lib.assertMsg (lib.length unknownTools == 0)
"The following tools are neither marked as unpackaged nor as packaged: ${
lib.generators.toPretty { } unknownTools
}";
"# WARNING: DO NOT EDIT\n"
+ "# This file is generated with packages.<system>.efmls-configs-sources, which is run automatically by CI\n"
+ (lib.generators.toPretty { } sources)
Expand Down
8 changes: 4 additions & 4 deletions flake-modules/updates/none-ls.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ let
unpackaged ++ noPackage ++ (lib.attrNames packaged)
);
in
assert lib.assertMsg (lib.length undeclaredTool == 0)
"Undeclared tools: ${lib.generators.toPretty { } undeclaredTool}";
assert lib.assertMsg (lib.length uselesslyDeclaredTool == 0)
"Tool is not supported upstream: ${lib.generators.toPretty { } uselesslyDeclaredTool}";
writeText "efmls-configs-sources.nix" (
assert lib.assertMsg (lib.length undeclaredTool == 0)
"Undeclared tools: ${lib.generators.toPretty { } undeclaredTool}";
assert lib.assertMsg (lib.length uselesslyDeclaredTool == 0)
"Tool is not supported upstream: ${lib.generators.toPretty { } uselesslyDeclaredTool}";
"# WARNING: DO NOT EDIT\n"
+ "# This file is generated with packages.<system>.none-ls-builtins, which is run automatically by CI\n"
+ (lib.generators.toPretty { } builtinSourceNames)
Expand Down