mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
Specify the size of the experimental feature array in a more robust way
See doc comment for details.
This commit is contained in:
parent
c14ba93290
commit
d854e8696b
1 changed files with 13 additions and 1 deletions
|
@ -12,7 +12,19 @@ struct ExperimentalFeatureDetails
|
||||||
std::string_view description;
|
std::string_view description;
|
||||||
};
|
};
|
||||||
|
|
||||||
constexpr std::array<ExperimentalFeatureDetails, 16> xpFeatureDetails = {{
|
/**
|
||||||
|
* If two different PRs both add an experimental feature, and we just
|
||||||
|
* used a number for this, we *woudln't* get merge conflict and the
|
||||||
|
* counter will be incremented once instead of twice, causing a build
|
||||||
|
* failure.
|
||||||
|
*
|
||||||
|
* By instead defining this instead as 1 + the bottom experimental
|
||||||
|
* feature, we either have no issue at all if few features are not added
|
||||||
|
* at the end of the list, or a proper merge conflict if they are.
|
||||||
|
*/
|
||||||
|
constexpr size_t numXpFeatures = 1 + static_cast<size_t>(Xp::VerifiedFetches);
|
||||||
|
|
||||||
|
constexpr std::array<ExperimentalFeatureDetails, numXpFeatures> xpFeatureDetails = {{
|
||||||
{
|
{
|
||||||
.tag = Xp::CaDerivations,
|
.tag = Xp::CaDerivations,
|
||||||
.name = "ca-derivations",
|
.name = "ca-derivations",
|
||||||
|
|
Loading…
Reference in a new issue