!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

945 Members
For people hacking on the Nix package manager itself201 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
21 Oct 2025
@juliankuners:matrix.orgJulian Sergei Zimmerman (xokdvium): Only the revision with no empty submodule directories is in the fetcher cache fetcher-cache-v4.sqlite. For the build to work, the store path should include empty submodule directories (or atleast for hashes to match). 14:15:12
@juliankuners:matrix.orgJulianSo I guess there must be some code that puts invalid entries into the fetcher cache? And this specifically only happens when the repository contains submodules that are not fetched?14:16:40
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)
In reply to @juliankuners:matrix.org
So I guess there must be some code that puts invalid entries into the fetcher cache? And this specifically only happens when the repository contains submodules that are not fetched?
When submodules are fetched it should not try to use the fetcher cache at all. That’s the issue I think. There’s some logic for it there, but it must have been broken somehow
14:17:59
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)(As in, it should not use the fetchToStore cache entry)14:18:27
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Because submodules are wonky and caching them correctly in a way that the narHash stays the same is hard14:19:20
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)This must have surfaced because fetchToStore caching was broken for a while and only got fixed recently in https://github.com/NixOS/nix/pull/1405014:20:54
@juliankuners:matrix.orgJulian

Hmm, considering all the past CI issues, I think I spotted one point in CI logs where the issue starts happening, as it logs the additional unpacking [...] log that later is not printed anymore. Though I cannot confirm whether this is the only place where the issue starts to appear. This code snippet in CI executes nix flake metadata . --refresh. It runs in a checkout without submodules, and I suppose without the empty git submodule directories.

Do you think this could populate the cache with an invalid entry?

14:24:42
@juliankuners:matrix.orgJulianThank you for these thoughts and hints. I guess I at least figured out the root cause now with this.14:25:52
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)
In reply to @juliankuners:matrix.org

Hmm, considering all the past CI issues, I think I spotted one point in CI logs where the issue starts happening, as it logs the additional unpacking [...] log that later is not printed anymore. Though I cannot confirm whether this is the only place where the issue starts to appear. This code snippet in CI executes nix flake metadata . --refresh. It runs in a checkout without submodules, and I suppose without the empty git submodule directories.

Do you think this could populate the cache with an invalid entry?

Hm, a local checkout might do that yeah. The git fetcher might consider it to be cacheable and doesn’t take into account empty subdirs
14:27:23

Show newer messages


Back to Room ListRoom Version: 6