[GHC] #13375: ghc-pkg "cache is out of date" message breaks testsuite
GHC
ghc-devs at haskell.org
Sun Mar 5 10:17:19 UTC 2017
#13375: ghc-pkg "cache is out of date" message breaks testsuite
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: (none)
Type: bug | Status: new
Priority: highest | Milestone: 8.2.1
Component: ghc-pkg | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by arybczak):
I compiled ghc from scratch and here's how inplace/lib/package.conf.d
changes:
10:18 - compilation start
<package.conf.d directory is created somewhere here>
10:25 - rts registered
10:33 - all other core packages registered (I think that's after ghc-
stage1 is built)
10:54 - a lock file is created (after ghc-stage2 is built)
The thing is that ghc-stage2, when run, reads package db and creates a
lock file, which wasn't there yet because all previous modifications of
package db were done using ghc-pkg with no locking support. Then, ghc-pkg
fails its naive modtime check (i.e. modtime of package.conf.d is higher
than package.cache precisely because ghc created lock file when reading
the database) and hence the warning.
Note that read lock is acquired on Windows only, that's why this doesn't
happen on other platforms.
I think we can either make the modtime check in ghc-pkg less naive (i.e.
compare max(modtime of .conf files) to modtime of package.cache instead of
modtime of the directory) or just call recache command.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13375#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list