Stores no longer inherit from their configs#13154
Conversation
e1acf3d to
d3a56fa
Compare
|
@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.) |
theory was correct |
d3a56fa to
8598565
Compare
|
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 <xokdvium@proton.me>
8598565 to
934918b
Compare
|
Big thanks to @xokdvium for figuring out the bug with |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2025-05-14-nix-team-meeting-minutes-226/64298/1 |
| * Need to make this a separate class so I can get the right | ||
| * initialization order in the constructor for `StoreDirConfig`. | ||
| */ | ||
| struct StoreDirConfigItself : Config |
context: #13154 (comment) (cherry picked from commit 2dd2142)
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.
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.
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.
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.
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.