Skip to content

Commit

Permalink
add assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
pnmadelaine committed Dec 26, 2024
1 parent 1b2126d commit 437bd63
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crate2nix/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3581,6 +3581,7 @@ rec {
}:
assert (builtins.isList features);
assert (builtins.isList dependencies);
assert (builtins.isString target);
assert (builtins.isAttrs targetSpec);
let
enabledDependencies = filterEnabledDependencies {
Expand Down Expand Up @@ -3711,6 +3712,7 @@ rec {
assert (builtins.isList features);
assert (builtins.isList dependencyPath);
assert (builtins.isAttrs featuresByPackageId);
assert (builtins.isString target);
assert (builtins.isAttrs targetSpec);
assert (builtins.isBool runTests);
let
Expand Down
2 changes: 2 additions & 0 deletions crate2nix/templates/nix/crate2nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ rec {
}:
assert (builtins.isList features);
assert (builtins.isList dependencies);
assert (builtins.isString target);
assert (builtins.isAttrs targetSpec);
let
enabledDependencies = filterEnabledDependencies {
Expand Down Expand Up @@ -582,6 +583,7 @@ rec {
assert (builtins.isList features);
assert (builtins.isList dependencyPath);
assert (builtins.isAttrs featuresByPackageId);
assert (builtins.isString target);
assert (builtins.isAttrs targetSpec);
assert (builtins.isBool runTests);
let
Expand Down
2 changes: 2 additions & 0 deletions sample_projects/bin_with_git_submodule_dep/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1799,6 +1799,7 @@ rec {
}:
assert (builtins.isList features);
assert (builtins.isList dependencies);
assert (builtins.isString target);
assert (builtins.isAttrs targetSpec);
let
enabledDependencies = filterEnabledDependencies {
Expand Down Expand Up @@ -1929,6 +1930,7 @@ rec {
assert (builtins.isList features);
assert (builtins.isList dependencyPath);
assert (builtins.isAttrs featuresByPackageId);
assert (builtins.isString target);
assert (builtins.isAttrs targetSpec);
assert (builtins.isBool runTests);
let
Expand Down
2 changes: 2 additions & 0 deletions sample_projects/codegen/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,7 @@ rec {
}:
assert (builtins.isList features);
assert (builtins.isList dependencies);
assert (builtins.isString target);
assert (builtins.isAttrs targetSpec);
let
enabledDependencies = filterEnabledDependencies {
Expand Down Expand Up @@ -1104,6 +1105,7 @@ rec {
assert (builtins.isList features);
assert (builtins.isList dependencyPath);
assert (builtins.isAttrs featuresByPackageId);
assert (builtins.isString target);
assert (builtins.isAttrs targetSpec);
assert (builtins.isBool runTests);
let
Expand Down
2 changes: 2 additions & 0 deletions sample_projects/sub_dir_crates/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ rec {
}:
assert (builtins.isList features);
assert (builtins.isList dependencies);
assert (builtins.isString target);
assert (builtins.isAttrs targetSpec);
let
enabledDependencies = filterEnabledDependencies {
Expand Down Expand Up @@ -713,6 +714,7 @@ rec {
assert (builtins.isList features);
assert (builtins.isList dependencyPath);
assert (builtins.isAttrs featuresByPackageId);
assert (builtins.isString target);
assert (builtins.isAttrs targetSpec);
assert (builtins.isBool runTests);
let
Expand Down

0 comments on commit 437bd63

Please sign in to comment.