Opened 4 years ago

Closed 9 months ago

Last modified 8 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: sibi
Priority: normal Milestone: 8.0.1
Component: ghc-pkg Version: 7.4.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #10785 Differential Rev(s): https://phabricator.haskell.org/D1575
Wiki Page:

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 (9)

comment:1 Changed 4 years 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 4 years ago by igloo

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

Fixed, thanks

comment:3 Changed 10 months ago by dmwit

  • Resolution fixed deleted
  • Status changed from closed to new

GHC has since grown a colored version of ghc-pkg, which did not inherit this nice feature.

comment:4 Changed 10 months ago by thomie

  • Component changed from Compiler to ghc-pkg

comment:5 Changed 9 months ago by sibi

  • Owner set to sibi

comment:6 Changed 9 months ago by sibi

  • Differential Rev(s) set to https://phabricator.haskell.org/D1575
  • Status changed from new to patch

comment:7 Changed 9 months ago by Ben Gamari <ben@…>

In 3d55e41e/ghc:

ghc-pkg: Restore old behavior in colored version; fixes 6119

The behavior is changed to this:
```
ghc-pkg list blahblah
/home/sibi/ghc/inplace/lib/package.conf.d
    (no packages)
```
instead of:
```
ghc-pkg list blahblah
/home/sibi/ghc/inplace/lib/package.conf.d
```

Reviewers: austin, thomie, bgamari

Reviewed By: thomie, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1575

GHC Trac Issues: #6119

comment:8 Changed 9 months ago by bgamari

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

comment:9 Changed 8 months ago by thomie

  • Milestone set to 8.0.1
Note: See TracTickets for help on using tickets.