unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Tobias Geerinckx-Rice <me@tobias.gr>
To: julien@lepiller.eu, 29359@debbugs.gnu.org
Subject: [bug#29359] [PATCH 08/31] gnu: Add java-jansi.
Date: Fri, 24 Nov 2017 16:31:20 +0100	[thread overview]
Message-ID: <581c24f4-635d-c954-fadf-7ca0d59f2046@tobias.gr> (raw)
In-Reply-To: <20171119185541.06581b0d@lepiller.eu>

Julien,

On Wed, Nov 22, 2017 at 10:33:56AM +0100, julien lepiller wrote:
> There's a small issue with this package: when it runs its tests, it
> will output formatted text with colors but forgets to clean the
> console afterwards, which leaves the console with a bold red font.> Any idea on how to clean that?

You could add a reset-terminal phase after the test phase that sends an
ANSI reset sequence. Either by invoking the ‘reset’ command, which would
add a dependency on ncurses and is probably overkill, or by sending
(from memory, so check) \e[0m which resets only colour and weight and is
probably all you need here.

> Shouldn't the environment block this kind of thing?

The problem is that the state modified by these escape sequences is in
the terminal itself.

We could filter build output through a sanitiser that strips or mangles
those sequences so we only print ‘plain text’ to the terminal (while
keeping them in logs — I'm sure some source-based package managers do
just that). I don't know if that would break some tests, though.

Kind regards,

T G-R

  reply	other threads:[~2017-11-24 15:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-19 17:55 [bug#29359] More java packages Julien Lepiller
2017-11-24 15:31 ` Tobias Geerinckx-Rice [this message]
2018-02-10 18:06 ` bug#29359: " Julien Lepiller
     [not found] <handler.29359.B.151111429223890.ack@debbugs.gnu.org>
2017-11-19 17:57 ` [bug#29359] [PATCH 01/31] gnu: Add java-gson Julien Lepiller
2017-11-19 17:57   ` [bug#29359] [PATCH 08/31] gnu: Add java-jansi Julien Lepiller
2017-11-22  9:33     ` julien lepiller
2017-11-24 14:41       ` Leo Famulari

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=581c24f4-635d-c954-fadf-7ca0d59f2046@tobias.gr \
    --to=me@tobias.gr \
    --cc=29359@debbugs.gnu.org \
    --cc=julien@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).