all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Steven Allen <steven@stebalien.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: help-guix@gnu.org
Subject: Re: Design decision behind inputs/native-inputs/propagated-inputs
Date: Sat, 23 Jan 2016 17:55:17 -0500	[thread overview]
Message-ID: <20160123225517.GA3442@stebalien.com> (raw)
In-Reply-To: <87wpr0t2xx.fsf@gnu.org>

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

Ludovic,

On 01-23-16, Ludovic Courtès wrote:
> At the end of a build, guix-daemon scans all the produced file in search
> of references to other store items.  It then records those run-time
> references (so a subset of the build-time dependencies) in the
> /var/guix/db/db.sqlite database, which can be queried with
> ‘guix gc --references’.

So Guix does auto detect which inputs are needed at runtime! Back to my
original question: why? I've read the relevant parts of the thesis (2.1,
3.3, 7.1.5) and none of them actually answer this question. The thesis
answers "why is this not a horrible idea?" with "it appears to work in
practice" (2.1, 7.1.5) which:

1. Isn't very satisfying.
2. Is wrong. It works in practice until some unexpected case comes up
   (e.g. python eggs) and the package manager itself has to be changed.
3. Doesn't actually motivate this feature.

The only motivation I can think of is that it makes packaging (1) easier
(2) less error prone. You don't have to care about what inputs are
needed at runtime, you just have to write down all inputs and the
package manager will detect which ones are needed at runtime for you.
However, this Guix can't fully take advantage of this because it needs
to support cross compilation. Therefore, all *platform-dependent* inputs
needed at build time need to be specially designated.

My proposal is to:

1. Keep everything in the inputs list at runtime (write this list down
   somewhere).
2. Move all build-only inputs into native-inputs.
3. Turn this auto detection into a lint that validates the inputs list
   (verify that the inputs list isn't *missing* an input).
4. Optionally rename native-inputs to build-inputs.

Motivation:

1. One can tell which inputs will be kept at runtime and which will not
   by looking at the package definition.
2. One can package any program without ever having to modify the build
   system or play games (e.g. decompress random files).
3. It's less error prone because it's explicit. Unlike the current
   system, it won't break if some file happens to be compressed or
   encoded in some unexpected format.

And my question is: are there any use cases that this doesn't support?

Sorry for the wall of text and thanks for the thesis/explanation!

-- 
Steven Allen
((Do Not Email <honeypot@stebalien.com>))

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

      reply	other threads:[~2016-01-23 22:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-21  4:49 Design decision behind inputs/native-inputs/propagated-inputs Steven Allen
2016-01-21  9:59 ` Ludovic Courtès
2016-01-21 16:08   ` Steven Allen
2016-01-21 21:42     ` Ben Woodcroft
     [not found]       ` <20160121221340.GA6151@stebalien.com>
     [not found]         ` <56A15FC4.2060501@uq.edu.au>
2016-01-21 23:19           ` Steven Allen
2016-01-21 23:57             ` Ben Woodcroft
2016-01-22  1:30               ` Steven Allen
2016-01-23 16:59                 ` Steven Allen
2016-01-23 21:12                   ` Ludovic Courtès
2016-01-23 22:55                     ` Steven Allen [this message]

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

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

  git send-email \
    --in-reply-to=20160123225517.GA3442@stebalien.com \
    --to=steven@stebalien.com \
    --cc=help-guix@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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.