* bug#32661: modify-phases: detect invalid phase addition
@ 2018-09-07 21:50 Ricardo Wurmus
2018-09-10 8:38 ` Gábor Boskovits
0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Wurmus @ 2018-09-07 21:50 UTC (permalink / raw)
To: 32661
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#32661: modify-phases: detect invalid phase addition
2018-09-07 21:50 bug#32661: modify-phases: detect invalid phase addition Ricardo Wurmus
@ 2018-09-10 8:38 ` Gábor Boskovits
0 siblings, 0 replies; 2+ messages in thread
From: Gábor Boskovits @ 2018-09-10 8:38 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 32661
[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]
Ricardo Wurmus <rekado@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
>
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 1670 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-10 8:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-07 21:50 bug#32661: modify-phases: detect invalid phase addition Ricardo Wurmus
2018-09-10 8:38 ` Gábor Boskovits
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).