#7456 closed bug (fixed)

GHC API displays linker messages to stdout instead of via log_action

Reported by: MikolajKonarski Owned by: igloo
Priority: high Milestone: 7.8.1
Component: GHC API Version: 7.4.2
Keywords: Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Other Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

At least in the LinkInMemory? mode, GHC API displays linker messages, such as

Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.

on stdout instead of using the log_action handler for them, just as for all the other kinds of messages. Moreover, I haven't found any way of suppressing these messages apart of setting verbosity=0, which turns off other important messages. I can see no GHC flags that does this and this linker does not accept any special linker flags. I don't know the policy about severity levels, but I suppose severity SevOutput? could be fine for these messages, by similarity to "compiling M ... done." messages which have such severity.

Change History (3)

comment:1 Changed 12 months ago by igloo

  • Difficulty set to Unknown
  • Milestone set to 7.8.1
  • Owner changed from duncan, MikolajKonarski to igloo
  • Priority changed from normal to high

thanks, I'll take a look.

comment:2 Changed 10 months ago by ian@…

commit f81e14bb14e459cdd59ea232f7c711827be85dd6

Author: Ian Lynagh <ian@well-typed.com>
Date:   Sun Jun 23 12:49:42 2013 +0100

    Allow the GHCi messages to be overridden via the GHC API; fixes #7456
    
    They now go through log_action. The existing severities all used
    printDoc, which always adds a trailing newline, which we don't
    want for the GHCi messages. I therefore added a new severity
    SevInteractive, which doesn't add a newline.

 compiler/ghci/Linker.lhs        |    9 +++++----
 compiler/main/DynFlags.hs       |   13 +++++++++++--
 compiler/main/ErrUtils.lhs      |    1 +
 compiler/main/ErrUtils.lhs-boot |    1 +
 4 files changed, 18 insertions(+), 6 deletions(-)

comment:3 Changed 10 months ago by igloo

  • Resolution set to fixed
  • Status changed from new to closed

Fixed; thanks for the report.

Note: See TracTickets for help on using tickets.