Opened 2 years ago

Closed 21 months ago

#6119 closed feature request (fixed)

complain when ghc-pkg doesn't find any matching packages in a given database

Reported by: dmwit Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.4.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Currently, ghc-pkg list will print something like the following when no package matches a query:

$ ghc-pkg list blargle
/usr/local/lib/ghc-7.4.1/package.conf.d

This is a deceptive answer for newcomers, because they assume that this means the package was successfully found, and lives in /usr/local/lib/ghc-7.4.1/package.conf.d. It would be nice if the message explicitly mentioned that the result list was actually empty; for example:

$ ghc-pkg list blargle
/usr/local/lib/ghc-7.4.1/package.conf.d
    (no matching packages found in this database)

Change History (2)

comment:1 Changed 21 months ago by ian@…

commit 55478b1ef856d47fba7e7dbd86baa88030d1b1cf

Author: Ian Lynagh <ian@well-typed.com>
Date:   Thu Oct 11 21:31:00 2012 +0100

    ghc-pkg: Print something when no packages are found; fixes #6119
    
    We used to say
    
        $ ghc-pkg list blargle
        /usr/local/lib/ghc-7.4.1/package.conf.d
    
    which may imply that blargle was found in
    /usr/local/lib/ghc-7.4.1/package.conf.d

 utils/ghc-pkg/Main.hs |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

comment:2 Changed 21 months ago by igloo

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

Fixed, thanks

Note: See TracTickets for help on using tickets.