diff options
Diffstat (limited to 'third_party/nix/src/proto/worker.proto')
-rw-r--r-- | third_party/nix/src/proto/worker.proto | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/third_party/nix/src/proto/worker.proto b/third_party/nix/src/proto/worker.proto index fe89b292a2e5..6a80b3e32b42 100644 --- a/third_party/nix/src/proto/worker.proto +++ b/third_party/nix/src/proto/worker.proto @@ -27,7 +27,7 @@ service WorkerService { // Build the specified derivations in one of the specified build // modes, defaulting to a normal build. - rpc BuildPaths(BuildPathsRequest) returns (google.protobuf.Empty); + rpc BuildPaths(BuildPathsRequest) returns (stream BuildEvent); // TODO: What does this do? rpc EnsurePath(StorePath) returns (google.protobuf.Empty); @@ -90,7 +90,7 @@ service WorkerService { // Build a single non-materialized derivation (i.e. not from an // on-disk .drv file). - rpc BuildDerivation(BuildDerivationRequest) returns (BuildDerivationResponse); + rpc BuildDerivation(BuildDerivationRequest) returns (stream BuildEvent); // Add signatures to the specified store path. The signatures are not // verified. @@ -174,6 +174,32 @@ message Signatures { repeated string sigs = 1; } +// Represents the outcome of a build for a single store path. +message BuildResult { + StorePath path = 1; + BuildStatus status = 2; + string msg = 3; +} + +// Represents an event occuring during a build. +message BuildEvent { + message LogLine { + string line = 1; + StorePath path = 2; + } + + oneof result_type { + // Build for a store path has finished + BuildResult result = 1; + + // A line of build log output was produced + LogLine build_log = 2; + + // Build for a store path has started + StorePath building_path = 3; + } +} + message IsValidPathResponse { bool is_valid = 1; } @@ -316,11 +342,6 @@ message BuildDerivationRequest { BuildMode build_mode = 3; } -message BuildDerivationResponse { - BuildStatus status = 1; - string error_message = 2; -} - message AddSignaturesRequest { StorePath path = 1; Signatures sigs = 2; |