diff options
author | regnat <rg@regnat.ovh> | 2021-10-25 15:53:01 +0200 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2021-10-26 07:02:31 +0200 |
commit | af99941279b80c962ec9cae3e5fa32976a3f5744 (patch) | |
tree | 034ffb01457354b07e9b6dac02892e1b5d8fca09 /src/libstore/build/entry-points.cc | |
parent | 4a2b7cc68c7d11ec126bc412ffea838e629345af (diff) |
Make experimental-features a proper type
Rather than having them plain strings scattered through the whole
codebase, create an enum containing all the known experimental features.
This means that
- Nix can now `warn` when an unkwown experimental feature is passed
(making it much nicer to spot typos and spot deprecated features)
- It’s now easy to remove a feature altogether (once the feature isn’t
experimental anymore or is dropped) by just removing the field for the
enum and letting the compiler point us to all the now invalid usages
of it.
Diffstat (limited to 'src/libstore/build/entry-points.cc')
-rw-r--r-- | src/libstore/build/entry-points.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/build/entry-points.cc b/src/libstore/build/entry-points.cc index 2b77e4354..065efc855 100644 --- a/src/libstore/build/entry-points.cc +++ b/src/libstore/build/entry-points.cc @@ -74,7 +74,7 @@ BuildResult Store::buildDerivation(const StorePath & drvPath, const BasicDerivat outputId, Realisation{ outputId, *staticOutput.second} ); - if (settings.isExperimentalFeatureEnabled("ca-derivations") && !derivationHasKnownOutputPaths(drv.type())) { + if (settings.isExperimentalFeatureEnabled(Xp::CaDerivations) && !derivationHasKnownOutputPaths(drv.type())) { auto realisation = this->queryRealisation(outputId); if (realisation) result.builtOutputs.insert_or_assign( |