GNU bug report logs - #77072
[PATCH v1] channels: add transformer field

Previous Next

Package: guix-patches;

Reported by: Jakob Kirsch <jakob.kirsch <at> web.de>

Date: Mon, 17 Mar 2025 15:20:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Rutherther <rutherther <at> ditigal.xyz>
To: 77072 <at> debbugs.gnu.org
Cc: Jakob Kirsch <jakob.kirsch <at> web.de>, Rutherther <rutherther <at> ditigal.xyz>
Subject: [bug#77072] [PATCH v1] channels: add transformer field
Date: Fri, 19 Sep 2025 16:11:20 +0200
Hi,

I think this currently breaks inferiors cache.
Specifically, the cache relies on the `commit` fields, merging them together
and obtaining a hash. Since the transformer field is not taken into
account, there can be an incorrect cache hit, specifically:

1. You make an inferior with some for given commits
2. You make an inferior with different transformers for same commits
This way you get cache hit, omitting the new transformers.

Same way if you change transformers from one to another.

This breaks both inferior in code and time-machine.

Moreover, I don't think this has an easy resolution. The thing is
that the transformers can do whatever, point to a file, download a file
from the internet... this means the result might not be the same for
first, second, third time you run it, because the underlying files can
change. For this reason, we cannot just hash contents of the transformer
field as text. I think that something similar to fixed output derivation
would have to be made. Specifically to tell Guix the patches haven't
changed. I think that what I described in my initial answer would help
this goal - instead of a transformer to use patches, those patches
would have a hash. Those hashes can then be used in the inferior cache
as well as for not obtaining the files again if not necessary. (they
could be fetched to the store as FODs) Alternatively the patches
could first be all obtained and hash made from the contents. This
would achieve the goal, while allowing for the files to change,
ie. if you point it to a PR and the PR gets a new version.

Rutherther




This bug report was last modified 4 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.