mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 15:02:42 +01:00
BuildResult: Add a "Cancelled" status
This denotes the result of a build that didn't succeed or fail, but was cancelled because some other goal failed and --keep-going was not enabled.
This commit is contained in:
parent
f98bc8f41f
commit
1cd5e62402
3 changed files with 4 additions and 2 deletions
|
|
@ -40,7 +40,7 @@ static BuildResult::Success::Status successStatusFromString(std::string_view str
|
|||
throw Error("unknown built result success status '%s'", str);
|
||||
}
|
||||
|
||||
static constexpr std::array<std::pair<BuildResult::Failure::Status, std::string_view>, 12> failureStatusStrings{{
|
||||
static constexpr std::array<std::pair<BuildResult::Failure::Status, std::string_view>, 13> failureStatusStrings{{
|
||||
#define ENUM_ENTRY(e) {BuildResult::Failure::e, #e}
|
||||
ENUM_ENTRY(PermanentFailure),
|
||||
ENUM_ENTRY(InputRejected),
|
||||
|
|
@ -54,6 +54,7 @@ static constexpr std::array<std::pair<BuildResult::Failure::Status, std::string_
|
|||
ENUM_ENTRY(NotDeterministic),
|
||||
ENUM_ENTRY(NoSubstituters),
|
||||
ENUM_ENTRY(HashMismatch),
|
||||
ENUM_ENTRY(Cancelled),
|
||||
#undef ENUM_ENTRY
|
||||
}};
|
||||
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ struct BuildResult
|
|||
/// know about this one, so change it back to `OutputRejected`
|
||||
/// before serialization.
|
||||
HashMismatch = 15,
|
||||
Cancelled = 16,
|
||||
} status = MiscFailure;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ public:
|
|||
/**
|
||||
* Build result.
|
||||
*/
|
||||
BuildResult buildResult;
|
||||
BuildResult buildResult = {.inner = BuildResult::Failure{.status = BuildResult::Failure::Cancelled}};
|
||||
|
||||
/**
|
||||
* Suspend our goal and wait until we get `work`-ed again.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue