about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/store-api.cc
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-08-20T01·32+0100
committertazjin <mail@tazj.in>2020-08-20T11·48+0000
commit19e874a9854c0d7f49d79fa98177a84b6997ce9a (patch)
treef6e68f233b45c6e596ee0719d09abf651e7d083f /third_party/nix/src/libstore/store-api.cc
parent883de9b8d71b9cb984d8ff315b4dcc30e0ca9082 (diff)
feat(tvix): Introduce build event streams in worker protocol r/1685
Introduces a new `BuildEvent` proto type which is streamed in response
to calls that trigger builds of derivations.

This type can currently supply build statuses, log lines and
information about builds starting.

This is in preparation for threading build logs through the processes.

Since we have nowhere to send the logs (yet), a null sink is used
instead.

Co-authored-by: Griffin Smith <grfn@gws.fyi>
Change-Id: If7332337b89506c7e404cd20174acdaa1a3be4e8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1793
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
Reviewed-by: kanepyork <rikingcoding@gmail.com>
Diffstat (limited to 'third_party/nix/src/libstore/store-api.cc')
-rw-r--r--third_party/nix/src/libstore/store-api.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/third_party/nix/src/libstore/store-api.cc b/third_party/nix/src/libstore/store-api.cc
index 3ada63532ca2..7972f5083657 100644
--- a/third_party/nix/src/libstore/store-api.cc
+++ b/third_party/nix/src/libstore/store-api.cc
@@ -92,7 +92,7 @@ nix::proto::BuildStatus BuildResult::status_to_proto() {
 }
 
 std::optional<BuildResult> BuildResult::FromProto(
-    const nix::proto::BuildDerivationResponse& resp) {
+    const nix::proto::BuildResult& resp) {
   BuildResult result;
   switch (resp.status()) {
     case proto::BuildStatus::Built:
@@ -125,7 +125,7 @@ std::optional<BuildResult> BuildResult::FromProto(
       return {};
   }
 
-  result.errorMsg = resp.error_message();
+  result.errorMsg = resp.msg();
   return result;
 }