Skip to content

LocalBinaryCacheStore::upsertFile support slash in path#14821

Merged
tomberek merged 1 commit intoNixOS:masterfrom
obsidiansystems:local-binary-cache-store-upsert
Dec 31, 2025
Merged

LocalBinaryCacheStore::upsertFile support slash in path#14821
tomberek merged 1 commit intoNixOS:masterfrom
obsidiansystems:local-binary-cache-store-upsert

Conversation

@Ericson2314
Copy link
Member

Context

While working on #12464, I realized this method was not correct in this case. With the current binary cache format, it is harmless, since we don't create arbitrary directories, but with my change, we started to.

Motivation

Regardless of whether we need it or not, I think it is better if the function just does the right thing.


Add 👍 to pull requests you find important.

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

While working on NixOS#12464, I realized this method was not correct in this
case. With the current binary cache format, it is harmless, since we
don't create arbitrary directories, but with my change, we started to.

Regardless of whether we need it or not, I think it is better if the
function just does the right thing.
@github-actions github-actions bot added the store Issues and pull requests concerning the Nix store label Dec 17, 2025
@xokdvium
Copy link
Contributor

Wouldn't we be able to just create the directory up-front instead? Seems pretty wasteful when we can just do this once.

@Ericson2314
Copy link
Member Author

We could, but I figured the cost is low, and it is easier to do it, than document "this must only create paths in directories that already existed.

It is not nice to have special invariants that are only in one implementation but not others, of a virtual method, though the fact that is a protected (IIRC) does help a little bit.

@tomberek tomberek self-assigned this Dec 31, 2025
@tomberek tomberek added this pull request to the merge queue Dec 31, 2025
Merged via the queue into NixOS:master with commit 843395a Dec 31, 2025
26 of 27 checks passed
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.

3 participants