commercialhaskell / commercialhaskell/stack
Possible stack hang/crash on windows related to GHC unicode warning
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
### General summary/comments (optional)
This is in relation to a bug reported against ghc: https://gitlab.haskell.org/ghc/ghc/issues/16917
Currently it's unclear what precisely the bug lies with. The original problem was a hanging build of `text-printer` on appveyor with stack. This could be reduced to a crash `: commitAndReleaseBuffer: invalid argument (invalid character)`, though it's unclear whether
that's stack or GHC crashing. (Also it's not entirely clear that that's the same problem as the hang.) Finally I was able to compile the offending code successfully by calling ghc directly, or by building via `runghc Setup.hs`, so it appears that either stack is at fault, or stack does something to the terminal which triggers the GHC bug.
I'm looking for help from someone who understands the stack side of things: Does this look more like a stack bug than a GHC bug? How might I pick this apart further?
### Steps to reproduce
The minmal crash: Fork github.com/robx/text-printer, hook it up with appveyor, and push the branch `error-reduce`.
For example: https://ci.appveyor.com/project/robx/text-printer/builds/25802913
### Expected
I'd expect the build to succeed
### Actual
The build fails with
```
[1 of 1] Compiling M
[;1msrc\M.hs:9:1: [;1mwarning:[;1m[;1m
Forall'd constraint `Eq a' is not bound in RULE lhs
Orig bndrs: [a, $dEq_a2oR, $dOrd_a2oS]
Orig lhs: let {
$dOrd_a2oV :: Ord a
[LclId]
$dOrd_a2oV = $dOrd_a2oS } in
let {
$dEq_a2po :: Eq a
[LclId]
$dEq_a2po = ghc-prim-0.5.3:GHC.Classes.$p1Ord @ a $dOrd_a2oS } in
let {
$dEq_a2oU :: Eq a
[LclId]
$dEq_a2oU = $dEq_a2po } in
f @ a $dEq_a2oU $dOrd_a2oV
optimised lhs: f @ a $dEq_a2oU $dOrd_a2oS
[;1m |
[;1m9 | [;1m{-# SPECIALIZE f : commitAndReleaseBuffer: invalid argument (invalid character)
Command exited with code 1
```
Contributor guide
Assessment
This issue has not been assessed yet.