[darcs-users] Something is seriously wrong with Darcs on Windows

Simon Marlow marlowsd at gmail.com
Tue Apr 27 11:11:51 UTC 2010

On 27/04/2010 11:54, Eric Kow wrote:
> Hi Simon,
> On Mon, Apr 26, 2010 at 22:52:32 +0100, Simon Marlow wrote:
>> Could you submit a bug for that?  I'm not by a Windows box right now to
>> test it, but looking at the code it looks like lstat has exactly the
>> same implementation as c_stat:
>> foreign import ccall unsafe "HsBase.h __hscore_lstat"
>>     lstat :: CFilePath ->  Ptr CStat ->  IO CInt
>> foreign import ccall unsafe "HsBase.h __hscore_stat"
>>     c_stat :: CFilePath ->  Ptr CStat ->  IO CInt
> Is there any relation whatsoever between this issue, and the recent
> http://bugs.darcs.net/issue1826 and Brian Smith's comment on Reddit
> that "The problems with building using GHC 6.12 on Windows are caused by
> a change in GHC's internal representation of filepaths on Windows; they
> were narrow strings previously and they are wide strings presently" [1]_
> Thanks,
> Eric
> .. [1] http://www.reddit.com/r/haskell/comments/buz97/why_arent_you_contributing_to_haskell/c0ouhuy

I imagine issue1826 and Brian Smith's comment are the same thing, and 
it's entirely possible that this could also cause the original error in 
this thread

darcs.exe: mmap of '_darcs/index' failed: does not exist (No such file
or directory)

and that would imply that someone had worked around the compile-time 
error in darcs by casting the pointer rather than converting the string 
to UTF-16, leading to a file-not-found.

However, I'm still bemused about the report that lstat returns random 
data on Windows.  I just looked around for uses of lstat, and it seems 
we use System.Posix.Internals.lstat on Windows in the implementation of 
System.Directory.renameFile, which is apparently working.


More information about the darcs-users mailing list