GNU bug report logs - #32661
modify-phases: detect invalid phase addition

Previous Next

Package: guix;

Reported by: Ricardo Wurmus <rekado <at> elephly.net>

Date: Fri, 7 Sep 2018 21:51:02 UTC

Severity: normal

To reply to this bug, email your comments to 32661 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#32661; Package guix. (Fri, 07 Sep 2018 21:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ricardo Wurmus <rekado <at> elephly.net>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 07 Sep 2018 21:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: bug-guix <at> gnu.org
Subject: modify-phases: detect invalid phase addition
Date: Fri, 07 Sep 2018 23:50:02 +0200
It is possible to add a build phase to a non-existing phase without an
error.  The new build phase will simply not be executed.

This is problematic when an inherited package augments the original
package’s phases and the original package is changed.  Imagine that the
parent package’s “pre-configure” phase is removed:

((#:phases original-phases)
`(modify-phases ,original-phases
  (add-after 'pre-configure 'patch-this
    (lambda _ …))))

This would cause the “patch-this” phase in the child package to be
skipped without warning.

This kind of thing can be especially confusing in the bootstrap, which
makes heavy use of inheritance.

--
Ricardo





Information forwarded to bug-guix <at> gnu.org:
bug#32661; Package guix. (Mon, 10 Sep 2018 08:39:02 GMT) Full text and rfc822 format available.

Message #8 received at 32661 <at> debbugs.gnu.org (full text, mbox):

From: Gábor Boskovits <boskovits <at> gmail.com>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 32661 <at> debbugs.gnu.org
Subject: Re: bug#32661: modify-phases: detect invalid phase addition
Date: Mon, 10 Sep 2018 10:38:39 +0200
[Message part 1 (text/plain, inline)]
Ricardo Wurmus <rekado <at> elephly.net> ezt írta (időpont: 2018. szept. 7., P
23:51):

> It is possible to add a build phase to a non-existing phase without an
> error.  The new build phase will simply not be executed.
>
> This is problematic when an inherited package augments the original
> package’s phases and the original package is changed.  Imagine that the
> parent package’s “pre-configure” phase is removed:
>
> ((#:phases original-phases)
> `(modify-phases ,original-phases
>   (add-after 'pre-configure 'patch-this
>     (lambda _ …))))
>
> This would cause the “patch-this” phase in the child package to be
> skipped without warning.
>
> This kind of thing can be especially confusing in the bootstrap, which
> makes heavy use of inheritance.
>
It would be nice to fix this. Also I have noticed that it is easier to make
mistakes when inheritance is involved, but these tend to only break derived
packages. I am not aware of a facility to make it easier to build all
derived packages. Am I missing something? I guess this would be a useful
tool, but not sure about implementation.

>
> --
> Ricardo
>
>
>
>
>
[Message part 2 (text/html, inline)]

This bug report was last modified 6 years and 275 days ago.

Previous Next


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