GNU bug report logs - #50335
Inheritance vs. ‘this-package’

Previous Next

Package: guix;

Reported by: Ludovic Courtès <ludovic.courtes <at> inria.fr>

Date: Thu, 2 Sep 2021 13:49:02 UTC

Severity: normal

Merged with 66510

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: 50335 <at> debbugs.gnu.org
Cc: philippe.swartvagher <at> inria.fr
Subject: bug#50335: Inheritance vs. ‘this-package’
Date: Sat, 04 Mar 2023 16:15:50 +0100
Ludovic Courtès <ludovic.courtes <at> inria.fr> skribis:

> We stumbled upon an idiom for package arguments that, combined with
> package inheritance, would not work as expected.

[...]

> We don’t want to (package-arguments this-package) here: that would
> naturally lead to an infinite loop.  But we want something close to it,
> in spirit: (package-arguments parent), where ‘parent’ is the package we
> inherit from.
>
> (package-arguments parent) could call the ‘arguments’ thunk of the
> parent, but it would pass it the child as its argument.

Here’s an example where I ended up manually defining ‘parent’:

  https://git.savannah.gnu.org/cgit/guix.git/commit/?h=core-updates&id=0aed5bf5120bd434e53be0cea3f96547f95837d6

Ludo’.




This bug report was last modified 1 year and 298 days ago.

Previous Next


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