unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Prikler <leo.prikler@student.tugraz.at>
To: julien@lepiller.eu, 38649@debbugs.gnu.org, ludo@gnu.org
Cc: roptat@lepiller.eu
Subject: [bug#38649] [PATCH] Parallelize `guix package`
Date: Tue, 17 Dec 2019 17:16:03 +0100	[thread overview]
Message-ID: <303cfa9fb7484874e028e55bb0fb82a9387207a7.camel@student.tugraz.at> (raw)
In-Reply-To: <09CEFC5C-85EB-4B43-BADD-C4D1920E656A@lepiller.eu>

Am Dienstag, den 17.12.2019, 16:50 +0100 schrieb Julien Lepiller:
> Le 17 décembre 2019 16:19:34 GMT+01:00, Leo Prikler <
> leo.prikler@student.tugraz.at> a écrit :
> > Of course, any operation can also fail midway due to some step not
> > succeeding.  In that case it would be as if one had issued the
> > other
> > command right after that, which may perhaps not be what one wanted
> > to
> > do (assuming I install package A, and some guide suggests to also
> > build
> > related, but not dependency-connected package B, so I end up
> > installing
> > B without A).  However, such cases can easily be fixed by either
> > installing a fixed version of A later, using B on its own if it can
> > be,
> > or rolling back.
> > 
> > Of course, both solutions are flawed in the way that they assume
> > user
> > intent either way.  Perhaps a better one would be to let the user
> > specify whether they want to wait or not through a command line
> > parameter, using the current behaviour as the default approach.
> > 
> > WDYT?
> 
> I might be missing something. Guix install etc act on a "hidden"
> descripcion of the profile. Tgey take the current profile, modify it
> as specified (adding a package, renovinh another or upgrading some).
> When you run two guix package in parallel, they both work on the same
> profile, which creates unexpected results.
That's why the lock is claimed first.  This way, the second process
acts on the profile that the first generated.  I've tested this by
installing cowsay in parallel to lolcat, but it should work for bigger
packages in much the same way.

> The expectation behind tge lock is that users will cancel tge ocher
> command and fix it before re-running it (e.g. instead of guix install
> foo & guix install bar, run guix install foo bar).
That is perhaps a reasonable expectation in most cases, but may be
annoying in others.  Take any package with an absurdly long build time
(e.g. icecat) and then think "Oh, but I also wanted this" while it is
building.  Now you have to either actively wait for icecat to complete
or stop it, add the other package and suffer the same build time again,
(whereas in the other way, you can wait for icecat to complete and
still launch a second process).

With the parallel builds of 0002, thing become even better, as you can
use bar even before foo is completed in case it manages to grab the
lock first.  With the long build of icecat against a package with a
relatively short build, this could very well be the case and might end
up being a game changer.  Of course, one could abuse ad-hoc
environments as well while waiting for the first process to finish, but
I don't think that's how people running into this problem expect to be
solving it (especially if they do want both foo and bar in their
profiles).

Regards,
Leo

  reply	other threads:[~2019-12-17 16:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17 14:18 [bug#38649] [PATCH] Parallelize `guix package` Leo Prikler
2019-12-17 14:20 ` Brett Gilio
2019-12-17 14:34   ` Leo Prikler
2019-12-17 14:38     ` Brett Gilio
2019-12-17 14:32 ` Ludovic Courtès
2019-12-17 15:19   ` Leo Prikler
2019-12-17 15:50     ` Julien Lepiller
2019-12-17 16:16       ` Leo Prikler [this message]
2019-12-18 14:37     ` Ludovic Courtès
2021-05-11 14:24       ` Leo Prikler

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=303cfa9fb7484874e028e55bb0fb82a9387207a7.camel@student.tugraz.at \
    --to=leo.prikler@student.tugraz.at \
    --cc=38649@debbugs.gnu.org \
    --cc=julien@lepiller.eu \
    --cc=ludo@gnu.org \
    --cc=roptat@lepiller.eu \
    /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).