unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Jan Nieuwenhuizen <janneke@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 32749@debbugs.gnu.org
Subject: bug#32749: package-with-explicit-inputs leaks-in additional inputs
Date: Tue, 18 Sep 2018 17:03:36 +0200	[thread overview]
Message-ID: <87in323l13.fsf@gnu.org> (raw)
In-Reply-To: <87d0taj2gm.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 18 Sep 2018 16:38:01 +0200")

Ludovic Courtès writes:

>> I tried this!  The dependencies look OK, but the package won't build --
>> there's no tar, make etc.
>
> Ah, true!
>
>> ...but that looks a bit strange: if we have to mention the inputs a
>> second time the advantage over using the `gnu-make-no-implicit-inputs'
>> package description becomes real small?
>
> The key thing is that ‘package-with-explicit-inputs’ works recursively:
> it adds (it does *not* replace) inputs to the whole package graph.

Ah, cool!

> Consider this:
>
>   (define x
>     (let ((p (package-with-explicit-inputs gnu-make
>                                            (%bootstrap-inputs+toolchain)
>                                            …)))
>       …))
>
> Here ‘%bootstrap-inputs+toolchain’ is called from the top level, when
> ‘%current-system’ has its default value.  So if you’re on x86_64, you
> get the x86_64 inputs.

Doh'!  The let is at toplevel...yeah that makes sense.

> So it’s not a bug per se, but it’s definitely an annoyance.

I agree, indeed it's rather a problem of interaction between
--system/(%current-system).

> I just realized that there’s already a fix for this, which is to pass
> ‘package-with-explicit-inputs’ a procedure rather than the input list,
> like this:
>
>   (package-with-explicit-inputs gnu-make
>                                 %bootstrap-inputs+toolchain
>                                 …)
>
> Does it work for you?

Yes!  I'm reverting my `...leak' commits and create thunks as input of
package-with-explicit-inputs.  Thanks!

janneke

  reply	other threads:[~2018-09-18 15:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-17 10:03 bug#32749: package-with-explicit-inputs leaks-in additional inputs Jan Nieuwenhuizen
2018-09-17 15:59 ` Jan Nieuwenhuizen
2018-09-17 20:26 ` Ludovic Courtès
2018-09-18  4:23   ` Jan Nieuwenhuizen
2018-09-18 14:38     ` Ludovic Courtès
2018-09-18 15:03       ` Jan Nieuwenhuizen [this message]
2018-09-19 20:42         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87in323l13.fsf@gnu.org \
    --to=janneke@gnu.org \
    --cc=32749@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).