unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jakub Kądziołka" <kuba@kadziolka.net>
To: guix-devel@gnu.org
Subject: Why does %build-inputs contain the transitive closure of inputs?!
Date: Sat, 8 Aug 2020 01:08:39 +0200	[thread overview]
Message-ID: <20200807230839.n4zussxemc2sxcp3@gravity> (raw)

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

Consider this package:

(use-modules
  (guix packages)
  (guix build-system trivial)
  (gnu packages version-control))

(define foo
  (package
    (name "foo")
    (version "0")
    (source #f)
    (build-system trivial-build-system)
    (arguments
     `(#:builder
       (begin
         (display %build-inputs)
         #t)))
    (inputs
     `(("libgit2" ,libgit2)))
    (synopsis "")
    (description "")
    (home-page "")
    (license #f)))

When we try building it, it prints:

((libgit2 . /gnu/store/hlcfmg5n29ynf354x7s4s7bkxswrmkq4-libgit2-1.0.1) (zlib . /gnu/store/rykm237xkmq7rl1p0nwass01p090p88x-zlib-1.2.11) (pcre2 . /gnu/store/ckpchpflfwhag5qsfk8klvmihwzqg9rp-pcre2-10.35) (openssl . /gnu/store/dkzivzn17qilmqdfpyps62b395wxhshh-openssl-1.1.1f))

Why? I would expect only libgit2 to be present, and not all of its
dependencies. It seems to me that this has only downsides - the entire
transitive closure needs to be present during build, even when the
actually used dependencies don't reference it, and the names of inputs
used by packages are now public API, and changing them can break the
build of any transitively dependent package.

I've traced this back to bag->derivation's use of
bag-transitive-inputs, but unfortunately git blame didn't hold any hints
- it has been this way ever since bag->derivation was first implemented.

Am I missing something, or is this a bug?

Regards,
Jakub Kądziołka

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2020-08-07 23:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-07 23:08 Jakub Kądziołka [this message]
2020-08-08  0:26 ` Why does %build-inputs contain the transitive closure of inputs?! Carlo Zancanaro
2020-08-08  0:56   ` Jakub Kądziołka

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=20200807230839.n4zussxemc2sxcp3@gravity \
    --to=kuba@kadziolka.net \
    --cc=guix-devel@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).