Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

Codex 0.3 error on Windows #36

Closed
mantkiew opened this issue May 20, 2015 · 5 comments
Closed

Codex 0.3 error on Windows #36

mantkiew opened this issue May 20, 2015 · 5 comments

Comments

@mantkiew
Copy link

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?

@aloiscochard
Copy link
Owner

Thanks for reporting this @mantkiew, I'll give it a try on my windows machine when I have a chance.

But maybe @bmjames have already a wild guess?

@aloiscochard
Copy link
Owner

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

@bmjames
Copy link
Contributor

bmjames commented May 21, 2015

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

@mantkiew
Copy link
Author

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.

@aloiscochard
Copy link
Owner

Thanks both, I'll add that in the README.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants