Skip to content

store-config: remove unnecessary const from Setting<> fields#15200

Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:remove-const-settings
Feb 11, 2026
Merged

store-config: remove unnecessary const from Setting<> fields#15200
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:remove-const-settings

Conversation

@amaanq
Copy link
Member

@amaanq amaanq commented Feb 11, 2026

Motivation

Stores hold their config as ref<const Config> or const Config &, so Setting<> fields are already immutable after store construction. The field-level const is redundant and prevents pre-construction mutation which is sometimes useful. This commit updates these settings by dropping the const qualifier, as it's not needed.

Context

Needed to improve #15197 (comment)


Add 👍 to pull requests you find important.

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

@amaanq amaanq requested a review from Ericson2314 as a code owner February 11, 2026 14:20
Stores hold their config as `ref<const Config>` or `const Config &`,
so `Setting<>` fields are already immutable after store construction.
The field-level `const` is redundant and prevents pre-construction
mutation which is sometimes useful. This commit updates these settings by dropping the `const` qualifier, as it's not needed.
@amaanq amaanq force-pushed the remove-const-settings branch from 350f930 to 1add776 Compare February 11, 2026 14:20
@amaanq amaanq changed the title store-config: remove unnecessary const from Setting<> fields store-config: remove unnecessary const from Setting<> fields Feb 11, 2026
@Ericson2314 Ericson2314 added this pull request to the merge queue Feb 11, 2026
Merged via the queue into NixOS:master with commit db8499e Feb 11, 2026
15 checks passed
@Ericson2314 Ericson2314 deleted the remove-const-settings branch February 11, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants