mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Improve "illegal path references in fixed output derivation" error
The main improvement is that the new message gives an example of a path
that is referenced, which should make it easier to track down. While
there, I also clarified the wording, saying exactly why the paths in
question were illegal.
(cherry picked from commit 4e5d1b281e
)
This commit is contained in:
parent
a28791a91e
commit
9c5482167f
1 changed files with 7 additions and 3 deletions
|
@ -2614,10 +2614,14 @@ SingleDrvOutputs LocalDerivationGoal::registerOutputs()
|
||||||
wanted.to_string(HashFormat::SRI, true),
|
wanted.to_string(HashFormat::SRI, true),
|
||||||
got.to_string(HashFormat::SRI, true)));
|
got.to_string(HashFormat::SRI, true)));
|
||||||
}
|
}
|
||||||
if (!newInfo0.references.empty())
|
if (!newInfo0.references.empty()) {
|
||||||
|
auto numViolations = newInfo.references.size();
|
||||||
delayedException = std::make_exception_ptr(
|
delayedException = std::make_exception_ptr(
|
||||||
BuildError("illegal path references in fixed-output derivation '%s'",
|
BuildError("fixed-output derivations must not reference store paths: '%s' references %d distinct paths, e.g. '%s'",
|
||||||
worker.store.printStorePath(drvPath)));
|
worker.store.printStorePath(drvPath),
|
||||||
|
numViolations,
|
||||||
|
worker.store.printStorePath(*newInfo.references.begin())));
|
||||||
|
}
|
||||||
|
|
||||||
return newInfo0;
|
return newInfo0;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue