Skip to content

Commit a828cf7

Browse files
committed
nix flake check: Remove incorrect assertion
The assumption that no unknown paths can be returned is incorrect. It can happen if a derivation has outputs that are substitutable, but that have references that cannot be substituted (i.e. an incomplete closure in the binary cache). This can easily happen with magic-nix-cache.
1 parent 3ed42cd commit a828cf7

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/nix/flake.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -793,8 +793,6 @@ struct CmdFlakeCheck : FlakeCommand
793793
// via substitution, as `nix flake check` only needs to verify buildability,
794794
// not actually produce the outputs.
795795
auto missing = store->queryMissing(drvPaths);
796-
// Only occurs if `drvPaths` contains a `DerivedPath::Opaque`, which should never happen
797-
assert(missing.unknown.empty());
798796

799797
std::vector<DerivedPath> toBuild;
800798
for (auto & path : missing.willBuild) {

0 commit comments

Comments
 (0)