unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: guix-devel@gnu.org
Subject: Re: User-Friendlyness of Guix and non-scaryness, printing messages
Date: Sun, 28 May 2017 23:12:44 +0200	[thread overview]
Message-ID: <878tlgn0s3.fsf@gnu.org> (raw)
In-Reply-To: <20170528214029.58dafacf@scratchpost.org> (Danny Milosavljevic's message of "Sun, 28 May 2017 21:40:29 +0200")

Hello,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

>> Perhaps for `guix package`, but I disagree for `guix build` and others.
>> It prints *only* the new store items on stdout, and this makes it very
>> easy to compose Guix commands. We should not break this.
>
> I agree. guix build is different.  Its whole point is to do that.
>
> The scripts I mean are:
> - guix package
> - guix system

Agreed for these.

Danny, your suggestions go a bit further than what I had in mind :-),
which was to write (roughly) one progress line per item built or
downloaded.

I’ve just pushed an old experiment as ‘wip-ui’ to give an idea of what I
mean.  If it still works, ‘guix package’ shows N line about the ongoing
progress, where N is the number of parallel jobs (--max-jobs).  It could
be as concise as this:
<http://nim-lang.org/news/e029_version_0_16_0.html>.

The easiest way to do that is to “parse” what goes to
‘current-build-output-port’ and to filter and format the relevant info
in the client.  ‘wip-ui’ is a very first stab at this.  The new (guix
status) module maintains a representation of the on-going builds and
downloads, which can be used by the UI.

When max-jobs is 1, it’s easy because we can print things sequentially,
and the patch does that well (modulo cosmetic improvements that can be
made).

But what should be the UI when max-jobs is greater than 1?  I was
thinking that if there are, say, 2 builds and 2 downloads in parallel,
we could display 4 lines, one for each of these.  Thus at each refresh,
we’d need to use ANSI codes to erase the previous lines and write the
updated lines.  However, this wouldn’t work with dumb terminals (like
shell-mode :-)) so we’d probably need a fallback mode.

Anyway, food for thought.  We should also come up with more mockups of
the ideal thing, or pointers to screenshots of existing UIs.

Also, parsing the build logs like this branch does is far from ideal.
We might need to rework the daemon protocol to have more structured
messages, and better routing/labeling of build logs.

Thanks,
Ludo’.

  parent reply	other threads:[~2017-05-28 21:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87bbe3e5.AEAAKL2r-KIAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZGcQo@mailjet.com>
     [not found] ` <87y3tw4kw3.fsf@gnu.org>
     [not found]   ` <fcac084e.AEEAKxWCyNIAAAAAAAAAAAOzWv8AAAACwQwAAAAAAAW9WABZH1iD@mailjet.com>
     [not found]     ` <87r2zfx0xt.fsf@gnu.org>
     [not found]       ` <427678e8.AEUAKjfDcSgAAAAAAAAAAAPB0agAAAACwQwAAAAAAAW9WABZKceD@mailjet.com>
2017-05-28 18:44         ` User-Friendlyness of Guix and non-scaryness, printing messages Danny Milosavljevic
2017-05-28 19:01           ` Danny Milosavljevic
2017-05-28 20:35             ` Danny Milosavljevic
2017-05-28 20:58               ` Danny Milosavljevic
2017-05-30 15:11                 ` Ludovic Courtès
2017-05-28 19:20           ` Leo Famulari
2017-05-28 19:40             ` Danny Milosavljevic
2017-05-28 19:47               ` Leo Famulari
2017-05-28 21:12               ` Ludovic Courtès [this message]
2017-05-31 22:26                 ` Danny Milosavljevic
2017-06-01 21:41                   ` Ludovic Courtès
2017-05-30  8:24               ` Ricardo Wurmus
2017-06-16 11:42                 ` Danny Milosavljevic
2017-06-17 20:16                   ` Ludovic Courtès
2017-05-30  1:47             ` "guix system" summary output? Danny Milosavljevic
2017-05-30 11:05               ` Danny Milosavljevic
2017-05-30 15:47               ` Ludovic Courtès
2017-05-30  8:17             ` User-Friendlyness of Guix and non-scaryness, printing messages Roel Janssen
2017-05-30 13:56               ` Arun Isaac
2017-05-30 14:32                 ` Christopher Allan Webber
2017-05-30 15:58                   ` Arun Isaac
2017-05-30 15:13                 ` Ludovic Courtès
2017-05-28 19:30           ` ng0

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=878tlgn0s3.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=dannym@scratchpost.org \
    --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).