Skip to content

Commit

Permalink
things TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
Enzime committed Nov 4, 2023
1 parent fb4388d commit 43db31d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libstore/globals.hh
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public:
command line switch and defaults to `1`. The value `0` means that
the builder should use all available CPU cores in the system.
)",
// TODO: determine if this should `auto` as getDefaultCores uses getMaxCPU then falls back on getMaxThreads
{"build-cores"}, "0"};

/**
Expand Down Expand Up @@ -296,6 +297,7 @@ public:
default is `true`.
)"};

// TODO: should this setting use defaultText
Setting<bool> useSQLiteWAL{this, !isWSL1(), "use-sqlite-wal",
"Whether SQLite should use WAL mode."};

Expand Down Expand Up @@ -344,6 +346,7 @@ public:
`NIX_REMOTE` is `daemon`). Obviously, this should not be used
with a nix daemon accessible to untrusted clients.
)",
// TODO: check this is a good way to improve the documentation
{}, "`nixbld` when running as root, *empty* otherwise"};

Setting<bool> autoAllocateUids{this, false, "auto-allocate-uids",
Expand Down Expand Up @@ -874,6 +877,7 @@ public:
)"};

Setting<std::string> netrcFile{
// TODO: figure out if updating the description worked well
this, fmt("%s/%s", nixConfDir, "netrc"), "netrc-file",
R"(
If set to an absolute path to a `netrc` file, Nix will use the HTTP
Expand Down
1 change: 1 addition & 0 deletions src/libutil/abstract-setting-to-json.hh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ std::map<std::string, nlohmann::json> BaseSetting<T>::toJSONObject()
auto obj = AbstractSetting::toJSONObject();
obj.emplace("value", value);
obj.emplace("defaultValue", defaultValue);
// TODO: consider not adding this value if defaultText == std::nullopt
obj.emplace("defaultText", defaultText);
return obj;
}
Expand Down

0 comments on commit 43db31d

Please sign in to comment.