GNU bug report logs - #30480
[PATCH] environment: Add --manifest option.

Previous Next

Package: guix-patches;

Reported by: "Thompson, David" <dthompson2 <at> worcester.edu>

Date: Fri, 16 Feb 2018 02:14:01 UTC

Severity: normal

Tags: patch

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30480 in the body.
You can then email your comments to 30480 AT debbugs.gnu.org in the normal way.

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

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


Report forwarded to guix-patches <at> gnu.org:
bug#30480; Package guix-patches. (Fri, 16 Feb 2018 02:14:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Thompson, David" <dthompson2 <at> worcester.edu>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 16 Feb 2018 02:14:01 GMT) Full text and rfc822 format available.

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

From: "Thompson, David" <dthompson2 <at> worcester.edu>
To: guix-patches <at> gnu.org
Subject: [PATCH] environment: Add --manifest option.
Date: Thu, 15 Feb 2018 21:12:58 -0500
[Message part 1 (text/plain, inline)]
In my lurkings I've seen people wondering why `guix environment`
doesn't work with manifests. The answer is simply: I never thought to
add it. This patch fixes that. The implementation is kind of
interesting and might seem a little silly to people that know how
manifests work.  In order to support manifests with minimal code and
make --manifest compose with other options I simply decompile the
manifest back into a list of package/output tuples.  That means in the
case of `guix environment --manifest=foo.scm` the manifest is created,
decompiled, and a new manifest created from that.  Seems redundant!
The advantage is that since --manifest composes with all the other
ways to specify packages we can do absolutely bonkers things like
`guix environment guile --ad-hoc ruby --manifest=foo.scm
--manifest=bar.scm --load=frob.scm --expression='(@ (gnu packages
python) python)'`.  More realistically you'd use it to throw in an
extra package or two with --ad-hoc.

Anyway, hope y'all like it.

- Dave
[0001-environment-Add-manifest-option.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#30480; Package guix-patches. (Fri, 16 Feb 2018 06:00:02 GMT) Full text and rfc822 format available.

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

From: Jan Nieuwenhuizen <janneke <at> gnu.org>
To: "Thompson\, David" <dthompson2 <at> worcester.edu>
Cc: 30480 <at> debbugs.gnu.org
Subject: Re: [bug#30480] [PATCH] environment: Add --manifest option.
Date: Fri, 16 Feb 2018 06:58:52 +0100
Thompson, David writes:

> In my lurkings I've seen people wondering why `guix environment`
> doesn't work with manifests. The answer is simply: I never thought to
> add it. This patch fixes that.

Ah :-)  I enjoyed reading your rationale and the elegant patch.

> Anyway, hope y'all like it.

Thank you, beautiful!
janneke

-- 
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




Information forwarded to guix-patches <at> gnu.org:
bug#30480; Package guix-patches. (Mon, 19 Feb 2018 21:22:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: "Thompson\, David" <dthompson2 <at> worcester.edu>
Cc: 30480 <at> debbugs.gnu.org
Subject: Re: [bug#30480] [PATCH] environment: Add --manifest option.
Date: Mon, 19 Feb 2018 22:21:37 +0100
Hi David!

"Thompson, David" <dthompson2 <at> worcester.edu> skribis:

> In my lurkings I've seen people wondering why `guix environment`
> doesn't work with manifests. The answer is simply: I never thought to
> add it. This patch fixes that. The implementation is kind of
> interesting and might seem a little silly to people that know how
> manifests work.  In order to support manifests with minimal code and
> make --manifest compose with other options I simply decompile the
> manifest back into a list of package/output tuples.  That means in the
> case of `guix environment --manifest=foo.scm` the manifest is created,
> decompiled, and a new manifest created from that.  Seems redundant!
> The advantage is that since --manifest composes with all the other
> ways to specify packages we can do absolutely bonkers things like
> `guix environment guile --ad-hoc ruby --manifest=foo.scm
> --manifest=bar.scm --load=frob.scm --expression='(@ (gnu packages
> python) python)'`.  More realistically you'd use it to throw in an
> extra package or two with --ad-hoc.

Indeed, that makes a lot of sense.  I wondered about doing that for
‘guix pack’ as well, it turns out to be more shenanigans than we’d like.

> From 47e0cf3bef26791c72222175899790a46c49af45 Mon Sep 17 00:00:00 2001
> From: David Thompson <dthompson2 <at> worcester.edu>
> Date: Thu, 15 Feb 2018 20:54:28 -0500
> Subject: [PATCH] environment: Add --manifest option.
>
> * guix/scripts/environment.scm (show-help, %options): Add -m/--manifest.
> (options/resolve-packages): Handle manifests.
> * doc/guix.texi (Invoking guix environment): Document it.

Could you add an example in tests/guix-environment.sh that uses a
manifest with the “guile-bootstrap” package for instance?

OK with this change!  :-)

Thank you,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#30480; Package guix-patches. (Wed, 21 Feb 2018 03:26:01 GMT) Full text and rfc822 format available.

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

From: "Thompson, David" <dthompson2 <at> worcester.edu>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 30480 <at> debbugs.gnu.org
Subject: Re: [bug#30480] [PATCH] environment: Add --manifest option.
Date: Tue, 20 Feb 2018 22:25:00 -0500
[Message part 1 (text/plain, inline)]
Hey Ludo,

On Mon, Feb 19, 2018 at 4:21 PM, Ludovic Courtès <ludo <at> gnu.org> wrote:
> Hi David!
>
> "Thompson, David" <dthompson2 <at> worcester.edu> skribis:
>
>> In my lurkings I've seen people wondering why `guix environment`
>> doesn't work with manifests. The answer is simply: I never thought to
>> add it. This patch fixes that. The implementation is kind of
>> interesting and might seem a little silly to people that know how
>> manifests work.  In order to support manifests with minimal code and
>> make --manifest compose with other options I simply decompile the
>> manifest back into a list of package/output tuples.  That means in the
>> case of `guix environment --manifest=foo.scm` the manifest is created,
>> decompiled, and a new manifest created from that.  Seems redundant!
>> The advantage is that since --manifest composes with all the other
>> ways to specify packages we can do absolutely bonkers things like
>> `guix environment guile --ad-hoc ruby --manifest=foo.scm
>> --manifest=bar.scm --load=frob.scm --expression='(@ (gnu packages
>> python) python)'`.  More realistically you'd use it to throw in an
>> extra package or two with --ad-hoc.
>
> Indeed, that makes a lot of sense.  I wondered about doing that for
> ‘guix pack’ as well, it turns out to be more shenanigans than we’d like.
>
>> From 47e0cf3bef26791c72222175899790a46c49af45 Mon Sep 17 00:00:00 2001
>> From: David Thompson <dthompson2 <at> worcester.edu>
>> Date: Thu, 15 Feb 2018 20:54:28 -0500
>> Subject: [PATCH] environment: Add --manifest option.
>>
>> * guix/scripts/environment.scm (show-help, %options): Add -m/--manifest.
>> (options/resolve-packages): Handle manifests.
>> * doc/guix.texi (Invoking guix environment): Document it.
>
> Could you add an example in tests/guix-environment.sh that uses a
> manifest with the “guile-bootstrap” package for instance?
>
> OK with this change!  :-)

Is this what you had in mind?

- Dave
[0001-environment-Add-manifest-option.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#30480; Package guix-patches. (Wed, 21 Feb 2018 22:11:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: "Thompson\, David" <dthompson2 <at> worcester.edu>
Cc: 30480 <at> debbugs.gnu.org
Subject: Re: [bug#30480] [PATCH] environment: Add --manifest option.
Date: Wed, 21 Feb 2018 23:10:50 +0100
Hi Dave,

"Thompson, David" <dthompson2 <at> worcester.edu> skribis:

> On Mon, Feb 19, 2018 at 4:21 PM, Ludovic Courtès <ludo <at> gnu.org> wrote:
>> Hi David!

[...]

>>> From 47e0cf3bef26791c72222175899790a46c49af45 Mon Sep 17 00:00:00 2001
>>> From: David Thompson <dthompson2 <at> worcester.edu>
>>> Date: Thu, 15 Feb 2018 20:54:28 -0500
>>> Subject: [PATCH] environment: Add --manifest option.
>>>
>>> * guix/scripts/environment.scm (show-help, %options): Add -m/--manifest.
>>> (options/resolve-packages): Handle manifests.
>>> * doc/guix.texi (Invoking guix environment): Document it.
>>
>> Could you add an example in tests/guix-environment.sh that uses a
>> manifest with the “guile-bootstrap” package for instance?
>>
>> OK with this change!  :-)
>
> Is this what you had in mind?

Yes, perfect.  Thank you!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#30480; Package guix-patches. (Thu, 22 Feb 2018 03:18:01 GMT) Full text and rfc822 format available.

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

From: "Thompson, David" <dthompson2 <at> worcester.edu>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 30480 <at> debbugs.gnu.org
Subject: Re: [bug#30480] [PATCH] environment: Add --manifest option.
Date: Wed, 21 Feb 2018 22:17:33 -0500
On Wed, Feb 21, 2018 at 5:10 PM, Ludovic Courtès <ludo <at> gnu.org> wrote:
> Hi Dave,
>
> "Thompson, David" <dthompson2 <at> worcester.edu> skribis:
>
>> On Mon, Feb 19, 2018 at 4:21 PM, Ludovic Courtès <ludo <at> gnu.org> wrote:
>>> Hi David!
>
> [...]
>
>>>> From 47e0cf3bef26791c72222175899790a46c49af45 Mon Sep 17 00:00:00 2001
>>>> From: David Thompson <dthompson2 <at> worcester.edu>
>>>> Date: Thu, 15 Feb 2018 20:54:28 -0500
>>>> Subject: [PATCH] environment: Add --manifest option.
>>>>
>>>> * guix/scripts/environment.scm (show-help, %options): Add -m/--manifest.
>>>> (options/resolve-packages): Handle manifests.
>>>> * doc/guix.texi (Invoking guix environment): Document it.
>>>
>>> Could you add an example in tests/guix-environment.sh that uses a
>>> manifest with the “guile-bootstrap” package for instance?
>>>
>>> OK with this change!  :-)
>>
>> Is this what you had in mind?
>
> Yes, perfect.  Thank you!

Pushed.  Do I have to do something special to close this ticket?

- Dave




Reply sent to Leo Famulari <leo <at> famulari.name>:
You have taken responsibility. (Thu, 22 Feb 2018 06:48:02 GMT) Full text and rfc822 format available.

Notification sent to "Thompson, David" <dthompson2 <at> worcester.edu>:
bug acknowledged by developer. (Thu, 22 Feb 2018 06:48:02 GMT) Full text and rfc822 format available.

Message #25 received at 30480-done <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: "Thompson, David" <dthompson2 <at> worcester.edu>
Cc: 30480-done <at> debbugs.gnu.org,
 Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: [bug#30480] [PATCH] environment: Add --manifest option.
Date: Thu, 22 Feb 2018 01:47:07 -0500
[Message part 1 (text/plain, inline)]
On Wed, Feb 21, 2018 at 10:17:33PM -0500, Thompson, David wrote:
> Pushed.  Do I have to do something special to close this ticket?

I'm closing it by appending -done to the bug number in the email
address.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#30480; Package guix-patches. (Thu, 22 Feb 2018 09:17:01 GMT) Full text and rfc822 format available.

Message #28 received at 30480-done <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: "Thompson, David" <dthompson2 <at> worcester.edu>
Cc: 30480-done <at> debbugs.gnu.org,
 Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: [bug#30480] [PATCH] environment: Add --manifest option.
Date: Thu, 22 Feb 2018 10:15:56 +0100
On Wed, Feb 21, 2018 at 10:17:33PM -0500, Thompson, David wrote:
> Pushed.  Do I have to do something special to close this ticket?

One just needs to send an e-mail to BUGNUMBER-done <at> debbugs.gnu.org,
as I am doing with this message.

Andreas





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 22 Mar 2018 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 176 days ago.

Previous Next


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