globals: make store settings private with typed accessors#15191
Closed
amaanq wants to merge 1 commit into
Closed
Conversation
Ericson2314
reviewed
Feb 10, 2026
Ericson2314
reviewed
Feb 10, 2026
5b7ecb7 to
9b97ca4
Compare
Ericson2314
reviewed
Feb 10, 2026
e3032ae to
a3dca5e
Compare
Ericson2314
reviewed
Feb 10, 2026
Ericson2314
reviewed
Feb 10, 2026
| .description = "The URL of the Nix store to use.", | ||
| .labels = {"store-uri"}, | ||
| .handler = {&(std::string &) settings.storeUri}, | ||
| .handler = {[](std::string s) { settings.set("store", s); }}, |
Member
There was a problem hiding this comment.
Is this necessary, if we're not changing the type of the setting?
Member
There was a problem hiding this comment.
ah yes, because the field is private now, hmm
a2f2cd9 to
f9e055a
Compare
The `storeUri`, `substituters`, and `trustedSubstituters` settings are now private with typed accessor methods that return `StoreReference` values, parsing on demand. The daemon client-settings filter uses these accessors for trusted-substituter validation.
f9e055a to
40f8eb8
Compare
Member
|
Closed in favor of #15192 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The
storeUri,substituters, andtrustedSubstituterssettings werepublicly accessible as raw strings. This commit makes them private and
adds typed accessor methods that return
StoreReferencevalues, parsingon demand. String-level accessors are also provided for daemon
client-settings filtering where string comparison is needed.
The CLI flags (
--from,--to,--eval-store, and substituter URIs insigs,verify,flake archive) now parse directly toStoreReferenceinstead of storing raw strings.Context
This is a stepping stone towards #10761
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.