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