Codex 0.3 error on Windows
mantkiew opened this issue · 5 comments
Hi, thanks for releasing codex 0.3 with support for windows!
I just tested it on my project as follows:
$ codex set tagger hasktags
$ codex set format sublime
$ codex update
hasktags: C:\Users\AppData\Roaming\cabal\packages\hackage.haskell.org\network-uri\2.6.0.3\tags: commitBuffer: invalid argument (invalid character)
hasktags: C:\Users\AppData\Roaming\cabal\packages\hackage.haskell.org\text\1.2.0.5\tags: commitBuffer: invalid argument (invalid character)
Updating clafer-0.4.0
I suppose that the tags file was actually updated; however, I see that instead of using the sandbox packages it has added tags to my user packages. Is that intended? Does it work for sandboxes?
BTW in case that was not clear: yes it must work with sandbox!
I had no time to look into it yet, but after re-reading the message it seems like the user directory is not properly resolve (C:\Users<user name>\AppData
should be for example C:\Users\mantkiew\AppData
)
It would be interesting to see if you can get what is the result of this function on your system:
http://hackage.haskell.org/package/directory-1.2.2.1/docs/System-Directory.html#v:getAppUserDataDirectory
My guess is that the error commitBuffer: invalid argument (invalid character)
points to it being related to file encodings. Perhaps you could try the workaround suggested here: http://jaspervdj.be/hakyll/tutorials/faq.html#hgetcontents-invalid-argument-or-commitbuffer-invalid-argument
So, I ran the following commands:
$ codex cache clean
$ rm codex.tags
$ codex update
which reproduces the reported error. Then I executed:
$ /c/Windows/System32/chcp.com 65001
$ codex cache clean
$ rm codex.tags
$ codex update
Codex ran without any errors.
Thanks both, I'll add that in the README
.