-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New store settings system #11139
base: master
Are you sure you want to change the base?
New store settings system #11139
Conversation
Following what is outlined in NixOS#10766 refactor the uds-remote-store such that the member variables (state) don't live in the store itself but in the config object. Additionally, the config object includes a new necessary constructor that takes a scheme & authority. Minor: * code formatting * cleanup of getting default path * added some comments
Co-authored-by: John Ericson <[email protected]>
Revert back to basic constructor in store-api.cc Co-authored-by: John Ericson <[email protected]>
Hopefully this fixes the macOS link error. It's also good for compilation time.
Not having these causes some issues with the new unit tests.
It is a property of the configuration of a store --- how a store URL is parsed into a store config, not a store itself. Progress towards NixOS#10766
This reverts commit c4c148f.
I believe it's quite valuable in this situation, and not all that confusing when documented properly. For this we can make use of the language server. (not using one is cruel anyway) Example: diff --git a/src/libstore/binary-cache-store.hh b/src/libstore/binary-cache-store.hh
index af649aaab..a638248c5 100644
--- a/src/libstore/binary-cache-store.hh
+++ b/src/libstore/binary-cache-store.hh
@@ -13,6 +13,7 @@ namespace nix {
struct NarInfo;
+/** @param T Either 'nix::config::JustValue' or `nix::config::SettingInfo` */
template<template<typename> class F>
struct BinaryCacheStoreConfigT
{
diff --git a/src/libutil/config-abstract.hh b/src/libutil/config-abstract.hh
index 2c34ff50b..e7f71e700 100644
--- a/src/libutil/config-abstract.hh
+++ b/src/libutil/config-abstract.hh
@@ -5,6 +5,9 @@
namespace nix::config {
+/**
+ * Just a value, no metadata. explain explain
+ */
template<typename T>
struct JustValue
{ With docs in these positions, readers can easily navigate to the explanations in the two relevant types that instantiate the fields. Note also that when hovering over a |
Now those are real numbers and booleans!
Otherwise we get nested arrays!
This avoids initialization order issues.
I guess we can use this in tests at some point.
we are not catching the mounted SSH store being XP early enough.
Motivation
See the linked issues for details.
The most notable user-relevant bits are:
This cleans up the
MountedSSHStore
: decomposed into its orthogonal partsThis brings us pretty close to being able to then implement a JSON-based config.
Also behind the scenes have these benefits:
Context
Do not review by commits
Part of #11106
Part of #10766
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.