1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-21 09:49:36 +01:00

Lock down BuildResult::Status enum values

This allows refactoring without changing wire protocol by mistake.
This commit is contained in:
John Ericson 2025-09-23 16:21:56 -04:00
parent 3bf1268ac6
commit 43550e8edb

View file

@ -20,26 +20,26 @@ struct BuildResult
*/ */
enum Status { enum Status {
Built = 0, Built = 0,
Substituted, Substituted = 1,
AlreadyValid, AlreadyValid = 2,
PermanentFailure, PermanentFailure = 3,
InputRejected, InputRejected = 4,
OutputRejected, OutputRejected = 5,
/// possibly transient /// possibly transient
TransientFailure, TransientFailure = 6,
/// no longer used /// no longer used
CachedFailure, CachedFailure = 7,
TimedOut, TimedOut = 8,
MiscFailure, MiscFailure = 9,
DependencyFailed, DependencyFailed = 10,
LogLimitExceeded, LogLimitExceeded = 11,
NotDeterministic, NotDeterministic = 12,
ResolvesToAlreadyValid, ResolvesToAlreadyValid = 13,
NoSubstituters, NoSubstituters = 14,
/// A certain type of `OutputRejected`. The protocols do not yet /// A certain type of `OutputRejected`. The protocols do not yet
/// know about this one, so change it back to `OutputRejected` /// know about this one, so change it back to `OutputRejected`
/// before serialization. /// before serialization.
HashMismatch, HashMismatch = 15,
} status = MiscFailure; } status = MiscFailure;
/** /**