unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Phases and snippets no longer returning a Boolean
@ 2020-11-24 23:17 Ludovic Courtès
  2020-11-25 10:53 ` 宋文武
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Ludovic Courtès @ 2020-11-24 23:17 UTC (permalink / raw)
  To: Guix Devel

Hello Guix!

As a followup to our recent discussion¹, I pushed the following commits
to ‘core-updates’:

  16111ad11c gnu: gcc: Phases no longer return a Boolean.
  3504e39a5d gnu: base, gcc: Removing trailing #t from snippets.
  325d00e619 packages: Ignore return value of origin snippets.
  4cebe82fa6 build-system/texlive: Phases no longer return a Boolean.
  49eadd270c build-system/minify: Phases no longer return a Boolean.
  112982526f gnu: base, commencement: Remove trailing #t from build phases.
  04baa011e9 build-system/gnu: Ignore the result of phase procedures.

With these changes, the return value of origin snippets and build phases
is now ignored.  It had been deprecated, with a warning emitted at build
time, since March 2018 (notably commit
daac9c77b9ed25a3c0edf843fdfe5e209ebef58f).  The introduction of ‘invoke’
(commit 3f65c190d23296e7e718c3deff413e8beb61d8ba), which would raise an
error when a program exits with non-zero, was also an enabler.  Because
of that I’m quite confident that breakage is unlikely, but we’ll keep an
eye on it.

I only removed trailing #t in a couple of files unlikely to result in
merge conflicts down the road, as Marius rightfully suggested on IRC.

That’s it!  Thoughts?  Comments?

#t!

Ludo’.

¹ https://lists.gnu.org/archive/html/guix-devel/2020-10/msg00332.html


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Phases and snippets no longer returning a Boolean
  2020-11-24 23:17 Phases and snippets no longer returning a Boolean Ludovic Courtès
@ 2020-11-25 10:53 ` 宋文武
  2020-11-25 13:27 ` Danny Milosavljevic
  2020-11-29 19:30 ` Maxim Cournoyer
  2 siblings, 0 replies; 7+ messages in thread
From: 宋文武 @ 2020-11-25 10:53 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix Devel

Ludovic Courtès <ludo@gnu.org> writes:


> With these changes, the return value of origin snippets and build phases
> is now ignored.
> ...
>
> That’s it!  Thoughts?  Comments?

Indeed better!  Return ‘#t’ feel perlish, perl requires return ‘1’ at
the end of each module.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Phases and snippets no longer returning a Boolean
  2020-11-24 23:17 Phases and snippets no longer returning a Boolean Ludovic Courtès
  2020-11-25 10:53 ` 宋文武
@ 2020-11-25 13:27 ` Danny Milosavljevic
  2020-11-25 14:02   ` zimoun
  2020-11-29 19:30 ` Maxim Cournoyer
  2 siblings, 1 reply; 7+ messages in thread
From: Danny Milosavljevic @ 2020-11-25 13:27 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix Devel

[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]

Hi Ludo,

On Wed, 25 Nov 2020 00:17:41 +0100
Ludovic Courtès <ludo@gnu.org> wrote:

> With these changes, the return value of origin snippets and build phases
> is now ignored.

Good riddance :)

No, seriously, good change.

> I only removed trailing #t in a couple of files unlikely to result in
> merge conflicts down the road, as Marius rightfully suggested on IRC.

I agree that we shouldn't graciously remove "#t"s in existing packages too
much.  It can just be done slowly as we touch each package anyway.

Since returning #f was effectively broken anyway for a year now (it wouldn't
cancel the build) I doubt we have any legitimate places in build phases where
it legitimately wants to cancel the build and thus returns #f, because that
wouldn't have worked anyway.

But the origin snippets, I'm not sure.  I guess those are lower risk anyway
since if the origin snippet doesn't like something, the result probably
doesn't have all the files anyway--cancelled or not.

Thanks for this change!

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Phases and snippets no longer returning a Boolean
  2020-11-25 13:27 ` Danny Milosavljevic
@ 2020-11-25 14:02   ` zimoun
  2020-11-25 17:53     ` Leo Famulari
  0 siblings, 1 reply; 7+ messages in thread
From: zimoun @ 2020-11-25 14:02 UTC (permalink / raw)
  To: Danny Milosavljevic, Ludovic Courtès; +Cc: Guix Devel

Hi,

Cool for the change!

On Wed, 25 Nov 2020 at 14:27, Danny Milosavljevic <dannym@scratchpost.org> wrote:

>> I only removed trailing #t in a couple of files unlikely to result in
>> merge conflicts down the road, as Marius rightfully suggested on IRC.
>
> I agree that we shouldn't graciously remove "#t"s in existing packages too
> much.  It can just be done slowly as we touch each package anyway.

When is planned (more or less) the next staging and core-updates merges?
The removals could be done at this moment.


All the best,
simon


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Phases and snippets no longer returning a Boolean
  2020-11-25 14:02   ` zimoun
@ 2020-11-25 17:53     ` Leo Famulari
  2020-11-27 10:59       ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Leo Famulari @ 2020-11-25 17:53 UTC (permalink / raw)
  To: zimoun; +Cc: Guix Devel

On Wed, Nov 25, 2020 at 03:02:28PM +0100, zimoun wrote:
> Hi,
> 
> Cool for the change!
> 
> On Wed, 25 Nov 2020 at 14:27, Danny Milosavljevic <dannym@scratchpost.org> wrote:
> 
> >> I only removed trailing #t in a couple of files unlikely to result in
> >> merge conflicts down the road, as Marius rightfully suggested on IRC.
> >
> > I agree that we shouldn't graciously remove "#t"s in existing packages too
> > much.  It can just be done slowly as we touch each package anyway.
> 
> When is planned (more or less) the next staging and core-updates merges?
> The removals could be done at this moment.

I think it's best to do them as we "touch" the packages for other
reasons. Otherwise, there is the risk of a large number of annoying
merge conflicts.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Phases and snippets no longer returning a Boolean
  2020-11-25 17:53     ` Leo Famulari
@ 2020-11-27 10:59       ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2020-11-27 10:59 UTC (permalink / raw)
  To: Leo Famulari; +Cc: Guix Devel

Leo Famulari <leo@famulari.name> skribis:

> On Wed, Nov 25, 2020 at 03:02:28PM +0100, zimoun wrote:
>> Hi,
>> 
>> Cool for the change!
>> 
>> On Wed, 25 Nov 2020 at 14:27, Danny Milosavljevic <dannym@scratchpost.org> wrote:
>> 
>> >> I only removed trailing #t in a couple of files unlikely to result in
>> >> merge conflicts down the road, as Marius rightfully suggested on IRC.
>> >
>> > I agree that we shouldn't graciously remove "#t"s in existing packages too
>> > much.  It can just be done slowly as we touch each package anyway.
>> 
>> When is planned (more or less) the next staging and core-updates merges?
>> The removals could be done at this moment.
>
> I think it's best to do them as we "touch" the packages for other
> reasons. Otherwise, there is the risk of a large number of annoying
> merge conflicts.

Agreed!

Ludo’.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Phases and snippets no longer returning a Boolean
  2020-11-24 23:17 Phases and snippets no longer returning a Boolean Ludovic Courtès
  2020-11-25 10:53 ` 宋文武
  2020-11-25 13:27 ` Danny Milosavljevic
@ 2020-11-29 19:30 ` Maxim Cournoyer
  2 siblings, 0 replies; 7+ messages in thread
From: Maxim Cournoyer @ 2020-11-29 19:30 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix Devel

Hey,

Ludovic Courtès <ludo@gnu.org> writes:

> Hello Guix!
>
> As a followup to our recent discussion¹, I pushed the following commits
> to ‘core-updates’:
>
>   16111ad11c gnu: gcc: Phases no longer return a Boolean.
>   3504e39a5d gnu: base, gcc: Removing trailing #t from snippets.
>   325d00e619 packages: Ignore return value of origin snippets.
>   4cebe82fa6 build-system/texlive: Phases no longer return a Boolean.
>   49eadd270c build-system/minify: Phases no longer return a Boolean.
>   112982526f gnu: base, commencement: Remove trailing #t from build phases.
>   04baa011e9 build-system/gnu: Ignore the result of phase procedures.
>
> With these changes, the return value of origin snippets and build phases
> is now ignored.  It had been deprecated, with a warning emitted at build
> time, since March 2018 (notably commit
> daac9c77b9ed25a3c0edf843fdfe5e209ebef58f).  The introduction of ‘invoke’
> (commit 3f65c190d23296e7e718c3deff413e8beb61d8ba), which would raise an
> error when a program exits with non-zero, was also an enabler.  Because
> of that I’m quite confident that breakage is unlikely, but we’ll keep an
> eye on it.
>
> I only removed trailing #t in a couple of files unlikely to result in
> merge conflicts down the road, as Marius rightfully suggested on IRC.
>
> That’s it!  Thoughts?  Comments?

Not much to say, other than: awesome!

It'll be difficult to undo the habit of returning #t in phases ;-).

Thanks!

Maxim


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-11-29 19:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24 23:17 Phases and snippets no longer returning a Boolean Ludovic Courtès
2020-11-25 10:53 ` 宋文武
2020-11-25 13:27 ` Danny Milosavljevic
2020-11-25 14:02   ` zimoun
2020-11-25 17:53     ` Leo Famulari
2020-11-27 10:59       ` Ludovic Courtès
2020-11-29 19:30 ` Maxim Cournoyer

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).