-
Notifications
You must be signed in to change notification settings - Fork 175
Add option for stdio encoding, set stdin encoding #747
Conversation
This is a pretty straightforward change. Only point of discussion I can see is whether optparse-applicative messages should use system encoding (in current version), or respect one set with @DanielG, I'd rather merge this sooner rather than later, if you don't mind, since it can cause interactive interface breakage on Windows machines if stdin encoding isn't set explicitly. P.S. Also, might be a good idea to coach HLint into using encoding specified here, but I'll leave that for another PR, since it's not directly related. |
@@ -107,7 +110,6 @@ getFileSourceFromStdin = do | |||
then fmap (x:) readStdin' | |||
else return [] | |||
|
|||
-- Someone please already rewrite the cmdline parsing code *weep* :'( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's been there for a while now. I thought that this is as good a time as any to remove it.
Looks perfectly fine to me feel free to merge it. Do you need this released soon too? |
If you plan on doing a minor release after all, I'd prefer it included there, I think. I can rebase on |
Add option for stdio encoding, set stdin, stderr encoding
Looks like this broke something on my end:
Probably shouldn't be forcing the encoding but rather only setting it when that's requested on the cmdline. |
See #758 |
This is weird. I only set stdin/stderr encoding (stdout was utf-8 anyway), — |
Maybe readProcess bases the encoding it uses on that of stdin/out or something like that? I did think that was weird too. |
Nevermind there is no readProcess in that code path GHC reads that directly it looks like. |
And of course I can't reproduce that now after rebuilding without the patch -.- |
Relevant issue: atom-haskell-archive/haskell-ghc-mod#105