[GHC] #10205: On Windows ghc-pkg always reports cache out of date

GHC ghc-devs at haskell.org
Fri Mar 27 22:24:23 UTC 2015


#10205: On Windows ghc-pkg always reports cache out of date
-------------------------------------+-------------------------------------
              Reporter:  hgolden     |             Owner:
                  Type:  bug         |            Status:  new
              Priority:  normal      |         Milestone:
             Component:  ghc-pkg     |           Version:  7.10.1
              Keywords:              |  Operating System:  Windows
          Architecture:  x86         |   Type of failure:  Incorrect result
             Test Case:              |  at runtime
              Blocking:              |        Blocked By:
Differential Revisions:              |   Related Tickets:
-------------------------------------+-------------------------------------
 When I ran {{{ghc-pkg list}}} on Windows, it reported that the global and
 user caches were out of date. As instructed, I recached both caches.
 Despite this, I continued to get the same error message. It appears that
 the timestamp on the package.conf.d directory is always a few milliseconds
 later than the timestamp of the package cache, even after recaching, as
 shown by the log excerpt below.

 Original error:
 {{{
 C:\Users\hgolden\AppData\Roaming>ghc-pkg check
 WARNING: cache is out of date:
 C:\Users\hgolden\AppData\Roaming\ghc\i386-mingw32-7.10.1\package.conf.d\package.cache
 ghc will see an old view of this package db. Use 'ghc-pkg recache' to fix.
 WARNING: cache is out of date: C:/Program
 Files/MinGHC-7.10.1/ghc-7.10.1\lib\package.conf.d\package.cache
 ghc will see an old view of this package db. Use 'ghc-pkg recache' to fix.
 [snip...]
 }}}
 Checking timestamps:
 {{{
 C:\Users\hgolden\AppData\Roaming>ghc-pkg -v2 list
 Timestamp 2015-03-27 21:18:29.5247984 UTC for
 C:\Users\hgolden\AppData\Roaming\ghc\i386-mingw32-7.10.1\package.conf.d\pa
 ckage.cache
 Timestamp 2015-03-27 21:18:29.5277984 UTC for
 C:\Users\hgolden\AppData\Roaming\ghc\i386-mingw32-7.10.1\package.conf.d (N
 EWER than cache)
 WARNING: cache is out of date:
 C:\Users\hgolden\AppData\Roaming\ghc\i386-mingw32-7.10.1\package.conf.d\package.cache
 ghc will see an old view of this package db. Use 'ghc-pkg recache' to fix.
 [snip...]
 Timestamp 2015-03-27 21:15:48.6285984 UTC for C:/Program
 Files/MinGHC-7.10.1/ghc-7.10.1\lib\package.conf.d\package.cache
 Timestamp 2015-03-27 21:15:48.6835984 UTC for C:/Program
 Files/MinGHC-7.10.1/ghc-7.10.1\lib\package.conf.d (NEWER than c
 ache)
 WARNING: cache is out of date: C:/Program
 Files/MinGHC-7.10.1/ghc-7.10.1\lib\package.conf.d\package.cache
 ghc will see an old view of this package db. Use 'ghc-pkg recache' to fix.
 [snip...]
 }}}
 Recaching as instructed:
 {{{
 C:\Users\hgolden\AppData\Roaming>ghc-pkg -v2 recache --user
 [snip...]
 modifying: Just
 "C:\\Users\\hgolden\\AppData\\Roaming\\ghc\\i386-mingw32-7.10.1\\package.conf.d"
 flag db stack:
 ["C:\\Users\\hgolden\\AppData\\Roaming\\ghc\\i386-mingw32-7.10.1\\package.conf.d"]
 writing cache
 C:\Users\hgolden\AppData\Roaming\ghc\i386-mingw32-7.10.1\package.conf.d\package.cache
 C:\Users\hgolden\AppData\Roaming>ghc-pkg -v2 recache --global
 [snip...]
 modifying: Just "C:/Program
 Files/MinGHC-7.10.1/ghc-7.10.1\\lib\\package.conf.d"
 flag db stack: ["C:/Program
 Files/MinGHC-7.10.1/ghc-7.10.1\\lib\\package.conf.d"]
 writing cache C:/Program
 Files/MinGHC-7.10.1/ghc-7.10.1\lib\package.conf.d\package.cache
 }}}
 Looking at timestamps after recaching:
 {{{
 C:\Users\hgolden\AppData\Roaming>ghc-pkg -v2 list
 Timestamp 2015-03-27 21:21:50.3341984 UTC for
 C:\Users\hgolden\AppData\Roaming\ghc\i386-mingw32-7.10.1\package.conf.d\pa
 ckage.cache
 Timestamp 2015-03-27 21:21:50.3371984 UTC for
 C:\Users\hgolden\AppData\Roaming\ghc\i386-mingw32-7.10.1\package.conf.d (N
 EWER than cache)
 WARNING: cache is out of date:
 C:\Users\hgolden\AppData\Roaming\ghc\i386-mingw32-7.10.1\package.conf.d\package.cache
 ghc will see an old view of this package db. Use 'ghc-pkg recache' to fix.
 [snip...]
 Timestamp 2015-03-27 21:23:05.4329984 UTC for C:/Program
 Files/MinGHC-7.10.1/ghc-7.10.1\lib\package.conf.d\package.cache
 Timestamp 2015-03-27 21:23:05.4359984 UTC for C:/Program
 Files/MinGHC-7.10.1/ghc-7.10.1\lib\package.conf.d (NEWER than c
 ache)
 WARNING: cache is out of date: C:/Program
 Files/MinGHC-7.10.1/ghc-7.10.1\lib\package.conf.d\package.cache
 ghc will see an old view of this package db. Use 'ghc-pkg recache' to fix.
 C:\Users\hgolden\AppData\Roaming>
 }}}
 Timestamps have changed, but each directory's timestamp is still a few
 milliseconds after each cache file's timestamp.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10205>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list