Skip to content

Simplify "Store dir" superclass#13764

Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:simplify-store-dir
Aug 15, 2025
Merged

Simplify "Store dir" superclass#13764
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:simplify-store-dir

Conversation

@Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Aug 15, 2025

Motivation

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

Context

Here's how we got here:

  1. I once factored out StoreDirConfig in Factor out StoreDirConfig #6236.

  2. I factored out MixStoreDirMethods in Stores no longer inherit from their configs #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.


Add 👍 to pull requests you find important.

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

@Ericson2314 Ericson2314 requested a review from edolstra as a code owner August 15, 2025 18:04
@github-actions github-actions bot added the store Issues and pull requests concerning the Nix store label 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 Ericson2314 merged commit 316fef3 into NixOS:master Aug 15, 2025
14 checks passed
@Ericson2314 Ericson2314 deleted the simplify-store-dir branch August 15, 2025 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

store Issues and pull requests concerning the Nix store

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants