[GHC] #10205: On Windows ghc-pkg always reports cache out of date
GHC
ghc-devs at haskell.org
Tue Jun 16 21:40:25 UTC 2015
#10205: On Windows ghc-pkg always reports cache out of date
-------------------------------------+-------------------------------------
Reporter: hgolden | Owner: thomie
Type: bug | Status: patch
Priority: normal | Milestone: 7.10.2
Component: ghc-pkg | Version: 7.10.1
Resolution: | Keywords:
Operating System: Windows | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions: Phab:D990
-------------------------------------+-------------------------------------
Comment (by Austin Seipp <austin@…>):
In [changeset:"f0636562908236f6ce9bf91796bc952534074a61/ghc"]:
{{{
#!CommitTicketReference repository="ghc"
revision="f0636562908236f6ce9bf91796bc952534074a61"
Fix ghc-pkg reports cache out date (#10205)
See Note [writeAtomic leaky abstraction].
GHC on Linux already received a patch for this bug in
e0801a0fb342eea9a312906eab72874d631271cf. On Windows several cabal tests
were hitting the bug, causing validate failures, but we never noticed
because of all the other tests that were failing on Windows. And it
didn't start happening till `getModificationTime` received sub-second
resolution support on Windows in
5cf76186d373842bf64d49cecb09e0a9ddce3203.
Since there are regression tests already, I am not adding another one.
But for good measure, here is a script that shows the bug without
needing to do a full validate run:
DB=/tmp/package.conf.d.test
GHC_PKG=ghc-pkg #utils/ghc-pkg/dist/build/tmp/ghc-pkg
LOCAL_GHC_PKG="${GHC_PKG} --no-user-package-db --global-package-
db=${DB}"
while true; do
rm -rf ${DB}
${LOCAL_GHC_PKG} init "${DB}"
${LOCAL_GHC_PKG} list
done
If you see "WARNING: cache is out of date" after a few seconds, the bug
is not fixed.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D990
GHC Trac Issues: #10205
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10205#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list