From be1f0697468bd6c0f2be4f7e058270c161098e9f Mon Sep 17 00:00:00 2001 From: Guillaume Maudoux Date: Fri, 4 Mar 2022 05:04:47 +0100 Subject: Add error context for most basic coercions --- src/libcmd/installables.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libcmd/installables.cc') diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index 3209456bf..e85482239 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -524,7 +524,7 @@ ref openEvalCache( auto vFlake = state.allocValue(); flake::callFlake(state, *lockedFlake, *vFlake); - state.forceAttrs(*vFlake, noPos); + state.forceAttrs(*vFlake, noPos, "While evaluating a cached flake"); auto aOutputs = vFlake->attrs->get(state.symbols.create("outputs")); assert(aOutputs); -- cgit v1.2.3 From 13c4dc65327c9654c47e6d80c0f4e1797b999f97 Mon Sep 17 00:00:00 2001 From: Guillaume Maudoux Date: Mon, 7 Mar 2022 11:33:03 +0100 Subject: more fixes --- src/libcmd/installables.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libcmd/installables.cc') diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index e85482239..437380a4d 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -524,7 +524,7 @@ ref openEvalCache( auto vFlake = state.allocValue(); flake::callFlake(state, *lockedFlake, *vFlake); - state.forceAttrs(*vFlake, noPos, "While evaluating a cached flake"); + state.forceAttrs(*vFlake, noPos, "While evaluating a cached flake: "); auto aOutputs = vFlake->attrs->get(state.symbols.create("outputs")); assert(aOutputs); -- cgit v1.2.3 From 1942fed6d9cee95775046c5ad3d253ab2e8ab210 Mon Sep 17 00:00:00 2001 From: Guillaume Maudoux Date: Fri, 18 Mar 2022 01:10:04 +0100 Subject: Revert extra colon at end os strings --- src/libcmd/installables.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libcmd/installables.cc') diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index 437380a4d..e85482239 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -524,7 +524,7 @@ ref openEvalCache( auto vFlake = state.allocValue(); flake::callFlake(state, *lockedFlake, *vFlake); - state.forceAttrs(*vFlake, noPos, "While evaluating a cached flake: "); + state.forceAttrs(*vFlake, noPos, "While evaluating a cached flake"); auto aOutputs = vFlake->attrs->get(state.symbols.create("outputs")); assert(aOutputs); -- cgit v1.2.3 From acf990c9ea9de913a500cf2b7a7492eef3bcd7b5 Mon Sep 17 00:00:00 2001 From: Guillaume Maudoux Date: Thu, 28 Apr 2022 12:54:14 +0200 Subject: fix errors case and wording --- src/libcmd/installables.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libcmd/installables.cc') diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index 40df12d1f..2f8283fd5 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -527,7 +527,7 @@ ref openEvalCache( auto vFlake = state.allocValue(); flake::callFlake(state, *lockedFlake, *vFlake); - state.forceAttrs(*vFlake, noPos, "While evaluating a cached flake"); + state.forceAttrs(*vFlake, noPos, "while parsing cached flake data"); auto aOutputs = vFlake->attrs->get(state.symbols.create("outputs")); assert(aOutputs); -- cgit v1.2.3 From 7797661a70bcd6a7caf756964785ea7727ed1be0 Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Tue, 20 Dec 2022 15:37:40 +0100 Subject: link "store derivation" to glossary definition --- src/libcmd/installables.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libcmd/installables.cc') diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index 5cdd3e12c..d2600ca91 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -168,7 +168,7 @@ SourceExprCommand::SourceExprCommand(bool supportReadOnlyMode) addFlag({ .longName = "derivation", - .description = "Operate on the store derivation rather than its outputs.", + .description = "Operate on the [store derivation](../../glossary.md#gloss-store-derivation) rather than its outputs.", .category = installablesCategory, .handler = {&operateOn, OperateOn::Derivation}, }); -- cgit v1.2.3 From 8cac451fce990151046996a13130bb1b91c6ba19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophane=20Hufschmitt?= Date: Mon, 2 Jan 2023 17:35:48 +0100 Subject: Fix why-depends for CA derivations (again) This has the same goal as b13fd4c58e81b2b2b0d72caa5ce80de861622610,but achieves it in a different way in order to not break `nix why-depends --derivation`. --- src/libcmd/installables.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/libcmd/installables.cc') diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index d2600ca91..b5675d5bd 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -931,10 +931,7 @@ std::vector, BuiltPathWithResult>> Instal DrvOutput outputId { *outputHash, output }; auto realisation = store->queryRealisation(outputId); if (!realisation) - throw Error( - "cannot operate on an output of the " - "unbuilt derivation '%s'", - outputId.to_string()); + throw MissingRealisation(outputId); outputs.insert_or_assign(output, realisation->outPath); } else { // If ca-derivations isn't enabled, assume that -- cgit v1.2.3