about summary refs log tree commit diff
path: root/tvix/build/protos/build.proto
diff options
context:
space:
mode:
authorYureka <tvl@yuka.dev>2024-09-27T19·48+0200
committerclbot <clbot@tvl.fyi>2024-10-01T13·40+0000
commit07e0cb1b0a8d1b0ce6140284aceeea91bcd0672a (patch)
tree79fada13b13c96c317955b221170aa2c11948fa2 /tvix/build/protos/build.proto
parentb82cacb449c71684aab533cb1f27ddfd48bf78da (diff)
feat(tvix/build): add refscanning interface r/8742
This provides a generic interface to let the builder search for needles
 in the output, as described in the notes at `docs/src/build/index.md`.

Change-Id: Ic2c5bd563e9aa2e766c157f2b13cdb19aede12f8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12531
Autosubmit: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: Brian Olsen <me@griff.name>
Diffstat (limited to 'tvix/build/protos/build.proto')
-rw-r--r--tvix/build/protos/build.proto14
1 files changed, 14 insertions, 0 deletions
diff --git a/tvix/build/protos/build.proto b/tvix/build/protos/build.proto
index 7a3c49db4873..1d6f8690c58c 100644
--- a/tvix/build/protos/build.proto
+++ b/tvix/build/protos/build.proto
@@ -144,6 +144,12 @@ message BuildRequest {
     bytes contents = 2;
   }
 
+  // If this is an non-empty list, all paths in `outputs` are scanned for these.
+  // For Nix, `refscan_needles` would be populated with the nixbase32 hash parts of
+  // every input store path and output store path. The latter is necessary to scan
+  // for references between multi-output derivations.
+  repeated string refscan_needles = 10;
+
   // TODO: allow describing something like "preferLocal", to influence composition?
 }
 
@@ -156,6 +162,14 @@ message Build {
   // They are sorted by their names.
   repeated tvix.castore.v1.Node outputs = 2;
 
+  message OutputNeedles {
+    // The numbers are indexing into `refscan_needles` originally specified in the BuildRequest.
+    repeated uint64 needles = 1;
+  }
+
+  // Contains the same number of elements as the `outputs` field.
+  repeated OutputNeedles outputs_needles = 3;
+
   // TODO: where did this run, how long, logs, …
 }