Stores no longer inherit from their configs#13154
Merged
Mic92 merged 1 commit intoNixOS:masterfrom May 14, 2025
Merged
Conversation
e1acf3d to
d3a56fa
Compare
Member
Author
|
@xokdvium I think the constructor for I am not sure how to fix this with the old settings system. Of course, my new store settings system in #11139 is designed to fix just these sorts of issues, but the point of splitting out this PR was to not do that refactor just yet. Any ideas? (I am running UBSAN right now to check this hypothesis.) |
Member
Author
theory was correct |
d3a56fa to
8598565
Compare
Member
Author
|
Solved an OOP problem with more OOP 🥴 |
Fix NixOS#10766 See that ticket for details. Progress (I hope!) towards NixOS#11139. Co-Authored-By: Sergei Zimmerman <[email protected]>
8598565 to
934918b
Compare
Member
Author
|
Big thanks to @xokdvium for figuring out the bug with |
Mic92
reviewed
May 14, 2025
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
edolstra
reviewed
May 15, 2025
| * Need to make this a separate class so I can get the right | ||
| * initialization order in the constructor for `StoreDirConfig`. | ||
| */ | ||
| struct StoreDirConfigItself : Config |
Mic92
added a commit
to Mic92/nix-1
that referenced
this pull request
May 15, 2025
Mic92
added a commit
to Mic92/nix-1
that referenced
this pull request
May 15, 2025
mergify bot
pushed a commit
that referenced
this pull request
May 15, 2025
context: #13154 (comment) (cherry picked from commit 2dd2142)
Ericson2314
added a commit
to obsidiansystems/nix
that referenced
this pull request
Aug 15, 2025
We can gut out some gratuitous inhertence as follows: - `MixStoreDirMethods` -> `StoreDir` - `StoreDirConfig` deleted because no longer needed. It is just folded into `StoreConfig`. - `StoreDirConfigBase` -> `StoreConfigBase` same trick still needed, but now is for `StoreConfig` not `StoreDirConfig` Here's how we got here: 1. I once factored out `StoreDirConfig` in NixOS#6236. 2. I factored out `MixStoreDirMethods` in NixOS#13154. But, I didn't realize at point (2) that we didn't need `StoreDirConfig` anymore, all uses of `StoreDirConfig` could instead be uses of `MixStoreDirMethods`. Now I am doing that, and renaming `MixStoreDirMethods` to just `StoreDir` because `MixStoreDirMethods` is an unnecessarily weird name.
Ericson2314
added a commit
to obsidiansystems/nix
that referenced
this pull request
Aug 15, 2025
We can cut out some gratuitous inhertence as follows: - `MixStoreDirMethods` -> `StoreDir` - `StoreDirConfig` deleted because no longer needed. It is just folded into `StoreConfig`. - `StoreDirConfigBase` -> `StoreConfigBase` same trick still needed, but now is for `StoreConfig` not `StoreDirConfig` Here's how we got here: 1. I once factored out `StoreDirConfig` in NixOS#6236. 2. I factored out `MixStoreDirMethods` in NixOS#13154. But, I didn't realize at point (2) that we didn't need `StoreDirConfig` anymore, all uses of `StoreDirConfig` could instead be uses of `MixStoreDirMethods`. Now I am doing that, and renaming `MixStoreDirMethods` to just `StoreDir` because `MixStoreDirMethods` is an unnecessarily weird name.
Ericson2314
added a commit
to obsidiansystems/nix
that referenced
this pull request
Aug 15, 2025
We can cut out some gratuitous inhertence as follows: - `MixStoreDirMethods` -> `StoreDirConfig` - `StoreDirConfig` deleted because no longer needed. It is just folded into `StoreConfig`. - `StoreDirConfigBase` -> `StoreConfigBase` same trick still needed, but now is for `StoreConfig` not `StoreDirConfig` Here's how we got here: 1. I once factored out `StoreDirConfig` in NixOS#6236. 2. I factored out `MixStoreDirMethods` in NixOS#13154. But, I didn't realize at point (2) that we didn't need `StoreDirConfig` anymore, all uses of `StoreDirConfig` could instead be uses of `MixStoreDirMethods`. Now I am doing that, and renaming `MixStoreDirMethods` to just `StoreDirConfig` to reduce churn.
Ericson2314
added a commit
to obsidiansystems/nix
that referenced
this pull request
Aug 15, 2025
We can cut out some gratuitous inhertence as follows: - `MixStoreDirMethods` -> `StoreDirConfig` - `StoreDirConfig` deleted because no longer needed. It is just folded into `StoreConfig`. - `StoreDirConfigBase` -> `StoreConfigBase` same trick still needed, but now is for `StoreConfig` not `StoreDirConfig` Here's how we got here: 1. I once factored out `StoreDirConfig` in NixOS#6236. 2. I factored out `MixStoreDirMethods` in NixOS#13154. But, I didn't realize at point (2) that we didn't need `StoreDirConfig` anymore, all uses of `StoreDirConfig` could instead be uses of `MixStoreDirMethods`. Now I am doing that, and renaming `MixStoreDirMethods` to just `StoreDirConfig` to reduce churn.
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
Fix #10766
Context
See that ticket for details.
Progress (I hope!) towards #11139.
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.