Use MemorySourceAccessor in DummyStore so writes work#10915
Conversation
f5ea10f to
48cfbec
Compare
48cfbec to
453ef36
Compare
|
Note that per #13757, nix/src/libfetchers-tests/git.cc Lines 182 to 185 in d7612f3 |
453ef36 to
28548e6
Compare
This will useful for unit tests.
28548e6 to
73ac8ea
Compare
Add `read-only` setting to `dummy://` store for back compat. Test by changing an existing test to use this instead, fixing a TODO. Co-Authored-By: HaeNoe <git@haenoe.party> Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
73ac8ea to
d5ce8c3
Compare
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2025-09-17-nix-team-meeting-minutes-248/69508/1 |
|
Sick! I actually think Dummy being "dumb" was kind of nice -- it was almost like "DevNullStore" |
It still is. You can't actually query store paths from it. |
|
@xokdvium maybe I mis read the description but I thought you could now.. that's why it needs "read-only" for back-compat. You can write to it but not read ? Yet?..... ;P |
Sort of. You can't query path infos now and some of the stuff breaks. This is enough for the purposes of unit tests though. |
|
Oh oops I meant for it to support querying path infos? Or at least I didn't intentionally make that not work. If we want to separate memory store from dummy store, that's fine for me too. |
Then |
|
Ah yeah I remember now, I wanted a map with the values being pairs of valid path infos and memory source accessors, but the interface still expects a single source accessor for the entire store. |
|
@Ericson2314 i'm down to pair on that.
|
|
OH oops @fzakaria, I already started this! |
|
@Ericson2314 you even had the sqlite idea too?! |
|
Nah not that part. Keeping it it all pure C++ |
Motivation
This makes the dummy store a lot more useful. In particular, it opens the door to running complex integration-ish store tests entirely in memory as part of the units tests so we have a reference implementation to hold against other store implementations.
Context
This was originally made for #10874.
Add
read-onlysetting todummy://store for back compat/Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.