Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#9606 closed bug (fixed)

Improve outdated ghc-pkg cache warning

Reported by: nh2 Owned by:
Priority: normal Milestone: 8.0.1
Component: ghc-pkg Version: 7.8.2
Keywords: Cc: nh2
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D658
Wiki Page:

Description

Sometimes you get this:

WARNING: cache is out of date: /home/user/.ghc/x86_64-linux-7.8.3/package.conf.d/package.cache.
Use 'ghc-pkg recache' to fix

The warning is correct but a bit confusing, because running ghc-pkg recache does nothing here: It will by default update your global package DB, and the DB the warning is about will still be out of date.

This seems to have frustrated others as well: https://gist.github.com/mcandre/5789498

I suggest we make the message more clear: You might have to pass --user to update this cache file.

Change History (6)

comment:1 Changed 5 years ago by simonpj

Sounds like a good idea to me. Would someone like to create and validate a patch?

Simon

comment:2 Changed 5 years ago by thoughtpolice

Milestone: 7.10.17.12.1

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:3 Changed 5 years ago by thomie

Differential Rev(s): Phab:D658
Status: newpatch

comment:4 Changed 5 years ago by Austin Seipp <austin@…>

In e7fab334b31dc516d2e8f2285630cbffe9825b76/ghc:

Improve outdated ghc-pkg cache warning (#9606)

Summary: No more frustration.

Test Plan: I tested it.

Reviewers: austin

Reviewed By: austin

Subscribers: thomie

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

GHC Trac Issues: #9606

comment:5 Changed 5 years ago by thoughtpolice

Resolution: fixed
Status: patchclosed

Merged, thanks!

comment:6 Changed 4 years ago by thoughtpolice

Milestone: 7.12.18.0.1

Milestone renamed

Note: See TracTickets for help on using tickets.