New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error decoding stream of UTF-8 bytes #1945

Closed
alcidesv opened this Issue Mar 23, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@alcidesv

alcidesv commented Mar 23, 2016

When building a rather large project I get the following:

2016-03-23 22:02:31.576489: [debug] Run process: C:\Users\alcides\AppData\Roaming\stack\setup-exe-cache\x86_64-windows\setup-Simple-Cabal-1.22.5.0-ghc-7.10.3.exe --builddir=.stack-work\dist\2672c1f3 build lib:shimmer-cat exe:shimmercat --ghc-options " -ddump-hi -ddump-to-file" @(stack_7LDm9brrZDRGPali8XJ7ve:System.Process.Read src/System\Process\Read.hs:287:3)
Data.Conduit.Text.decode: Error decoding stream of UTF-8 bytes. Error encountered in stream at offset 101048. Encountered at byte sequence "\229r i"

This is happening on Windows. I know that this bug report is not particularly helpful because I can not give a minimal example. I wouldn't know where to start. In fact, stack in Windows compiles fines both a very basic project and a ton of libraries.

I will try to find what the problem is tomorrow. But if anybody can provide some guidance that would help a lot.

@mgsloan mgsloan added this to the P2: Should milestone Mar 23, 2016

mgsloan added a commit that referenced this issue Mar 23, 2016

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented Mar 23, 2016

See #793 for some suggestions of things to try for this. Could be that GHC is confused about the locale.

However, I don't think it makes sense for us to do a strict UTF8 decode here. I've pushed a commit that switches it to a lenient decode. Can you please confirm that this resolves the issue (re-open if not). Use stack upgrade --git to use the latest development version.

@mgsloan mgsloan closed this Mar 23, 2016

@alcidesv

This comment has been minimized.

alcidesv commented Mar 24, 2016

Thanks you very much! I can confirm that this commit fixes the issue. For the record, my Windows is in Swedish, and setting the LANG environment variable to en_US.UTF-8 didn't help before this commit.

dysinger added a commit that referenced this issue Mar 30, 2016

Merge remote-tracking branch 'origin/master' into improve-gpg-signnin…
…g-by-using-full-fingerprint

* origin/master: (91 commits)
  init: allow local packages to be deps of deps
  Print cabal error message in a consistent manner
  Update help text for "stack image container" arg
  add many optional container image names
  cleanup
  Use lenient UTF-8 decode for build output #1945
  Remove unnecessary import
  Delete unused ToolMap type
  Changes for stack.yaml configurable build options
  Fix comment
  In 'loadSourceMap', load the package caches only when necessary
  Rename configProjectWorkDir to getProjectWorkDir
  Update "stack clean" haddocks, rename CleanTargets to CleanShallow
  Refactor Stack.Clean.clean
  Improve "stack clean --full" help message
  Remove redundant parameter on CleanFull
  s/build/built/
  release.hs: constant for GPG options
  release.hs: use SHA256 digests for GPG signatures
  Fix build after merge
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment