darcs

Issue 2334 Tip can't build on windows - File.hs / System.Posix.Files.ownerModes

Title Tip can't build on windows - File.hs / System.Posix.Files.ownerModes
Priority Status unknown
Milestone Resolved in 2.10.0
Superseder Nosy List ganesh, matt.lamari
Assigned To
Topics

Created on 2013-07-24.08:02:43 by matt.lamari, last changed 2018-11-24.23:46:25 by bf.

Messages
msg16927 (view) Author: matt.lamari Date: 2013-07-24.08:02:42
Latest Haskell system, verified on 2 Win8/64 machines. . . .

C:\t\darcs.net>cabal build
Building darcs-2.9.7...
Preprocessing library darcs-2.9.7...
[ 51 of 213] Compiling Darcs.Util.File  ( src\Darcs\Util\File.hs,
dist\build\Dar
cs\Util\File.o )

src\Darcs\Util\File.hs:23:41:
    Module `System.Posix.Files' does not export `ownerModes'

C:\t\darcs.net>
msg16928 (view) Author: gh Date: 2013-07-24.08:29:28
Most probably comes from my recent patch "resolve issue2181: put cache
in $XDG_CACHE_HOME (~/.cache by default)".

Can you try to compile without this patch?

I don't understand why ownerModes is the faulty function while
unix-compat provides it (like the other functions used in
Darcs.Util.File).

Does anyone know how unix-compat works in darcs, and how come we are
able to import System.Posix.Files while unix-compat only seems to
provide System.PosixCompat.Files?
msg16958 (view) Author: matt.lamari Date: 2013-07-28.03:54:43
Yes, removing  "resolve issue2181: put cache in $XDG_CACHE_HOME
(~/.cache by default)" patch lets Darcs compile in windows.  The rest of
the issue is . . .beyond my understanding.
msg16969 (view) Author: gh Date: 2013-08-06.20:13:55
Can you check that the repository http://darcs.net builds on Windows now?
msg16970 (view) Author: ganesh Date: 2013-08-06.20:58:26
I confirm that without the patch I get a build failure on Windows and with 
the patch the build is fine.

Apologies for not doing something about this myself earlier!
msg17052 (view) Author: noreply Date: 2013-10-07.00:16:39
The following patch sent by Guillaume Hoffmann <guillaumh@gmail.com> updated issue issue2334 with
status=resolved;resolvedin=2.10.0 HEAD

* resolve issue2334 fix win32 build removing file permission functions 
Ignore-this: ee88db0d9edaca8ed962a92e0c136233
msg20554 (view) Author: bf Date: 2018-11-24.23:46:23
gh, to answer your question, even if it's been 5 years ago:

Darcs defines its own System.Posix.Files, that's why. It mostly re-
exports System.PosixCompat.Files. But it doesn't do so via module export 
but rather lists several functions. The function ownermode is missing 
here, which is why it didn't compile on windows.

It is better to just import stuff from System.PosixCompat.Files 
everywhere. Will send a patch.
History
Date User Action Args
2013-07-24 08:02:43matt.lamaricreate
2013-07-24 08:29:29ghsetmessages: + msg16928
2013-07-28 03:54:44matt.lamarisetmessages: + msg16958
2013-07-29 08:25:44ghsetnosy: + ganesh
2013-08-06 20:13:56ghsetmessages: + msg16969
2013-08-06 20:58:27ganeshsetmessages: + msg16970
2013-10-07 00:16:40noreplysetstatus: unknown -> resolved
messages: + msg17052
resolvedin: 2.10.0
2018-11-24 23:46:25bfsetstatus: resolved -> unknown
messages: + msg20554