1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00

Merge pull request #9874 from pennae/error-reports

improve error reports somewhat
This commit is contained in:
tomberek 2024-03-08 10:51:14 -05:00 committed by GitHub
commit a200ee6bf7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 336 additions and 142 deletions

View file

@ -212,11 +212,10 @@ static Flake readFlake(
{
auto flakePath = rootDir / CanonPath(resolvedRef.subdir) / "flake.nix";
// NOTE evalFile forces vInfo to be an attrset because mustBeTrivial is true.
Value vInfo;
state.evalFile(flakePath, vInfo, true);
expectType(state, nAttrs, vInfo, state.positions.add(Pos::Origin(rootDir), 1, 1));
Flake flake {
.originalRef = originalRef,
.resolvedRef = resolvedRef,