Skip to content

Make store setting and store flags use StoreReference#10761

Closed
Ericson2314 wants to merge 1 commit intomasterfrom
store-reference-flags-settings
Closed

Make store setting and store flags use StoreReference#10761
Ericson2314 wants to merge 1 commit intomasterfrom
store-reference-flags-settings

Conversation

@Ericson2314
Copy link
Member

Motivation

Better to be more typed!

Note sure what the crash is about yet.

Context

Follows up from the recent #9839

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions bot added new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store fetching Networking with the outside (non-Nix) world, input locking c api Nix as a C library with a stable interface labels May 23, 2024
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 10, 2026
Change the private settings from strings to typed StoreReference values.
Add BaseSetting specializations via a bridge header and JSON serialization
for StoreReference. Based on NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 10, 2026
The private `storeUri`, `substituters`, and `trustedSubstituters`
settings previously stored raw strings and parsed them on demand in the
accessors. This commit changes them to store typed `StoreReference`
values directly, simplifying the accessors to just forward `.get()`.

A bridge header `store-config-impl.hh` declares the `BaseSetting`
specializations needed, and JSON serialization is added for
`StoreReference` to support `nix show-config --json`.

Based on the approach from NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 10, 2026
The private `storeUri`, `substituters`, and `trustedSubstituters`
settings previously stored raw strings and parsed them on demand in the
accessors. This commit changes them to store typed `StoreReference`
values directly, simplifying the accessors to just forward `.get()`.

A bridge header `store-config-impl.hh` declares the `BaseSetting`
specializations needed, and JSON serialization is added for
`StoreReference` to support `nix show-config --json`.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 10, 2026
The private `storeUri`, `substituters`, and `trustedSubstituters`
settings previously stored raw strings and parsed them on demand in the
accessors. This commit changes them to store typed `StoreReference`
values directly, simplifying the accessors to just forward `.get()`.

A bridge header `store-config-impl.hh` declares the `BaseSetting`
specializations needed, and JSON serialization is added for
`StoreReference` to support `nix show-config --json`.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 10, 2026
The private `storeUri`, `substituters`, and `trustedSubstituters`
settings previously stored raw strings and parsed them on demand in the
accessors. This commit changes them to store typed `StoreReference`
values directly, simplifying the accessors to just forward `.get()`.

A bridge header `store-config-impl.hh` declares the `BaseSetting`
specializations needed, and JSON serialization is added for
`StoreReference` to support `nix show-config --json`.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 10, 2026
The private `storeUri`, `substituters`, and `trustedSubstituters`
settings previously stored raw strings and parsed them on demand in the
accessors. This commit changes them to store typed `StoreReference`
values directly, simplifying the accessors to just forward `.get()`.

A bridge header `store-config-impl.hh` declares the `BaseSetting`
specializations needed, and JSON serialization is added for
`StoreReference` to support `nix show-config --json`.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The private `storeUri`, `substituters`, and `trustedSubstituters`
settings previously stored raw strings and parsed them on demand in the
accessors. This commit changes them to store typed `StoreReference`
values directly, simplifying the accessors to just forward `.get()`.

A bridge header `store-config-impl.hh` declares the `BaseSetting`
specializations needed, and JSON serialization is added for
`StoreReference` to support `nix show-config --json`.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The private `storeUri`, `substituters`, and `trustedSubstituters`
settings previously stored raw strings and parsed them on demand in the
accessors. This commit changes them to store typed `StoreReference`
values directly, simplifying the accessors to just forward `.get()`.

A bridge header `store-config-impl.hh` declares the `BaseSetting`
specializations needed, and JSON serialization is added for
`StoreReference` to support `nix show-config --json`.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The private `storeUri`, `substituters`, and `trustedSubstituters`
settings previously stored raw strings and parsed them on demand in the
accessors. This commit changes them to store typed `StoreReference`
values directly, simplifying the accessors to just forward `.get()`.

A bridge header `store-config-impl.hh` declares the `BaseSetting`
specializations needed, and JSON serialization is added for
`StoreReference` to support `nix show-config --json`.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The private `storeUri`, `substituters`, and `trustedSubstituters`
settings previously stored raw strings and parsed them on demand in the
accessors. This commit changes them to store typed `StoreReference`
values directly, simplifying the accessors to just forward `.get()`.

A bridge header `store-config-impl.hh` declares the `BaseSetting`
specializations needed, and JSON serialization is added for
`StoreReference` to support `nix show-config --json`.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The private `storeUri`, `substituters`, and `trustedSubstituters`
settings previously stored raw strings and parsed them on demand in the
accessors. This commit changes them to store typed `StoreReference`
values directly, simplifying the accessors to just forward `.get()`.

A bridge header `store-config-impl.hh` declares the `BaseSetting`
specializations needed, and JSON serialization is added for
`StoreReference` to support `nix show-config --json`.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The private `storeUri`, `substituters`, and `trustedSubstituters`
settings previously stored raw strings and parsed them on demand in the
accessors. This commit changes them to store typed `StoreReference`
values directly, simplifying the accessors to just forward `.get()`.

A bridge header `store-config-impl.hh` declares the `BaseSetting`
specializations needed, and JSON serialization is added for
`StoreReference` to support `nix show-config --json`.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The private `storeUri`, `substituters`, and `trustedSubstituters`
settings previously stored raw strings and parsed them on demand in the
accessors. This commit changes them to store typed `StoreReference`
values directly, simplifying the accessors to just forward `.get()`.

A bridge header `store-config-impl.hh` declares the `BaseSetting`
specializations needed, and JSON serialization is added for
`StoreReference` to support `nix show-config --json`.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The private `storeUri`, `substituters`, and `trustedSubstituters`
settings previously stored raw strings and parsed them on demand in the
accessors. This commit changes them to store typed `StoreReference`
values directly, simplifying the accessors to just forward `.get()`.

A bridge header `store-config-impl.hh` declares the `BaseSetting`
specializations needed, and JSON serialization is added for
`StoreReference` to support `nix show-config --json`.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The private `storeUri`, `substituters`, and `trustedSubstituters`
settings previously stored raw strings and parsed them on demand in the
accessors. This commit changes them to store typed `StoreReference`
values directly, simplifying the accessors to just forward `.get()`.

A bridge header `store-config-impl.hh` declares the `BaseSetting`
specializations needed, and JSON serialization is added for
`StoreReference` to support `nix show-config --json`.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The private `storeUri`, `substituters`, and `trustedSubstituters`
settings previously stored raw strings and parsed them on demand in the
accessors. This commit changes them to store typed `StoreReference`
values directly, simplifying the accessors to just forward `.get()`.

A bridge header `store-config-impl.hh` declares the `BaseSetting`
specializations needed, and JSON serialization is added for
`StoreReference` to support `nix show-config --json`.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
Change `storeUri`, `substituters`, and `trustedSubstituters` from
raw string types (`Setting<std::string>`, `Setting<Strings>`,
`Setting<StringSet>`) to typed `StoreReference` types
(`Setting<StoreReference>`, `Setting<std::vector<StoreReference>>`,
`Setting<std::set<StoreReference>>`).

Callers now work with the typed fields directly instead of manually
parsing strings into `StoreReference` values on each access.

A bridge header `store-config-impl.hh` declares the `BaseSetting`
specializations needed, and JSON serialization is added for
`StoreReference` to support `nix show-config --json`.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The `storeUri`, `substituters`, and `trustedSubstituters` settings now
store typed `StoreReference` values directly instead of raw strings,
so callers work with the real types without manual parsing.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The `storeUri`, `substituters`, and `trustedSubstituters` settings now
store typed `StoreReference` values directly instead of raw strings,
so callers work with the real types without manual parsing.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The `storeUri`, `substituters`, and `trustedSubstituters` settings now
store typed `StoreReference` values directly instead of raw strings,
so callers work with the real types without manual parsing.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The `storeUri`, `substituters`, and `trustedSubstituters` settings now
store typed `StoreReference` values directly instead of raw strings,
so callers work with the real types without manual parsing.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The `storeUri`, `substituters`, and `trustedSubstituters` settings now
store typed `StoreReference` values directly instead of raw strings,
so callers work with the real types without manual parsing.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The `storeUri`, `substituters`, and `trustedSubstituters` settings now
store typed `StoreReference` values directly instead of raw strings,
so callers work with the real types without manual parsing.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The `storeUri`, `substituters`, and `trustedSubstituters` settings now
store typed `StoreReference` values directly instead of raw strings,
so callers work with the real types without manual parsing.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The `storeUri`, `substituters`, and `trustedSubstituters` settings now
store typed `StoreReference` values directly instead of raw strings,
so callers work with the real types without manual parsing.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The `storeUri`, `substituters`, and `trustedSubstituters` settings now
store typed `StoreReference` values directly instead of raw strings,
so callers work with the real types without manual parsing.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The `storeUri`, `substituters`, and `trustedSubstituters` settings now
store typed `StoreReference` values directly instead of raw strings,
so callers work with the real types without manual parsing.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The `storeUri`, `substituters`, and `trustedSubstituters` settings now
store typed `StoreReference` values directly instead of raw strings,
so callers work with the real types without manual parsing.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The `storeUri`, `substituters`, and `trustedSubstituters` settings now
store typed `StoreReference` values directly instead of raw strings,
so callers work with the real types without manual parsing.

This is a reworked version of NixOS#10761.
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 11, 2026
The `storeUri`, `substituters`, and `trustedSubstituters` settings now
store typed `StoreReference` values directly instead of raw strings,
so callers work with the real types without manual parsing.

This is a reworked version of NixOS#10761.
@Ericson2314
Copy link
Member Author

Closed in favor of #15192, which should be merged shortly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c api Nix as a C library with a stable interface fetching Networking with the outside (non-Nix) world, input locking new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant