@@ -55,29 +55,46 @@ struct BuildResult
55
55
static std::string_view statusToString (Status status)
56
56
{
57
57
switch (status) {
58
- case Built: return " Built" ;
59
- case Substituted: return " Substituted" ;
60
- case AlreadyValid: return " AlreadyValid" ;
61
- case PermanentFailure: return " PermanentFailure" ;
62
- case InputRejected: return " InputRejected" ;
63
- case OutputRejected: return " OutputRejected" ;
64
- case TransientFailure: return " TransientFailure" ;
65
- case CachedFailure: return " CachedFailure" ;
66
- case TimedOut: return " TimedOut" ;
67
- case MiscFailure: return " MiscFailure" ;
68
- case DependencyFailed: return " DependencyFailed" ;
69
- case LogLimitExceeded: return " LogLimitExceeded" ;
70
- case NotDeterministic: return " NotDeterministic" ;
71
- case ResolvesToAlreadyValid: return " ResolvesToAlreadyValid" ;
72
- case NoSubstituters: return " NoSubstituters" ;
73
- default : return " Unknown" ;
58
+ case Built:
59
+ return " Built" ;
60
+ case Substituted:
61
+ return " Substituted" ;
62
+ case AlreadyValid:
63
+ return " AlreadyValid" ;
64
+ case PermanentFailure:
65
+ return " PermanentFailure" ;
66
+ case InputRejected:
67
+ return " InputRejected" ;
68
+ case OutputRejected:
69
+ return " OutputRejected" ;
70
+ case TransientFailure:
71
+ return " TransientFailure" ;
72
+ case CachedFailure:
73
+ return " CachedFailure" ;
74
+ case TimedOut:
75
+ return " TimedOut" ;
76
+ case MiscFailure:
77
+ return " MiscFailure" ;
78
+ case DependencyFailed:
79
+ return " DependencyFailed" ;
80
+ case LogLimitExceeded:
81
+ return " LogLimitExceeded" ;
82
+ case NotDeterministic:
83
+ return " NotDeterministic" ;
84
+ case ResolvesToAlreadyValid:
85
+ return " ResolvesToAlreadyValid" ;
86
+ case NoSubstituters:
87
+ return " NoSubstituters" ;
88
+ case HashMismatch:
89
+ return " HashMismatch" ;
90
+ default :
91
+ return " Unknown" ;
74
92
};
75
93
}
76
94
77
- std::string toString () const {
78
- return
79
- std::string (statusToString (status))
80
- + ((errorMsg == " " ) ? " " : " : " + errorMsg);
95
+ std::string toString () const
96
+ {
97
+ return std::string (statusToString (status)) + ((errorMsg == " " ) ? " " : " : " + errorMsg);
81
98
}
82
99
83
100
/* *
@@ -165,7 +182,6 @@ struct KeyedBuildResult : BuildResult
165
182
};
166
183
167
184
void to_json (nlohmann::json & json, const BuildResult & buildResult);
168
-
169
- }
185
+ void to_json (nlohmann::json & json, const KeyedBuildResult & buildResult);
170
186
171
187
} // namespace nix
0 commit comments