[Haskell-cafe] Problem with ghc-9.2.2 on Windows

Ben Franksen ben.franksen at online.de
Thu Apr 28 10:38:57 UTC 2022


Hi everyone

I have a strange problem with ghc-9.2.2 on Windows. I recently updated 
the cabal file for darcs to allow building with ghc-9.2, which required 
only a few minor changes. But when I ran the tests using our github CI I 
noticed two regressions vs. ghc-9.0.2 on Windows. It turned out that 
both tests (shell scripts) try to run the darcs executable under test 
with a restricted PATH environment variable; the idea is to test what 
happens if darcs tries to run some external program which cannot be 
found in the PATH.

The problem is that executing darcs under these circumstances fails 
immediately without any error message. In fact it seems to fail *before 
the main procedure is executed*. I tested this by printing some text to 
stderr in main before doing anything else and the text is not printed. 
The error cannot be reproduced with a simple example program, which 
seems to indicate that the problem may be caused by a library. But I am 
not aware of any way a library can influence code that is executed 
before main.

Any kind of input on how to diagnose this problem further would be 
appreciated. I this were on Linux I'd use strace to find out if anything 
is trying to run an external program before main but this happens on 
Windows only and the only access I have to a Windows machine to run 
tests on is via the github CI.

BTW, using `cabal freeze` I found these differences in library versions 
between the ghc-9.0 and ghc-9.2 builds. If I am not mistaken they are 
all "boot" libraries i.e. ones that come with ghc.

ben at home[1]:.../darcs/screened>diff cabal.project.freeze-ghc-9.0 
cabal.project.freeze-ghc-9.2
2c2
< constraints: any.Cabal ==3.4.1.0,
---
 > constraints: any.Cabal ==3.6.3.0,
25c25
<              any.base ==4.15.1.0,
---
 >              any.base ==4.16.1.0,
34c34
<              any.binary ==0.8.8.0,
---
 >              any.binary ==0.8.9.0,
37c37
<              any.bytestring ==0.10.12.1,
---
 >              any.bytestring ==0.11.3.0,
51c51
<              any.containers ==0.6.4.1,
---
 >              any.containers ==0.6.5.1,
61c61
<              any.deepseq ==1.4.5.0,
---
 >              any.deepseq ==1.4.6.1,
73c73
<              any.filepath ==1.4.2.1,
---
 >              any.filepath ==1.4.2.2,
76,78c76,78
<              any.ghc-bignum ==1.1,
<              any.ghc-boot-th ==9.0.2,
<              any.ghc-prim ==0.7.0,
---
 >              any.ghc-bignum ==1.2,
 >              any.ghc-boot-th ==9.2.2,
 >              any.ghc-prim ==0.8.0,
81a82
 >              haskeline +examples +terminfo,
113c114
<              any.parsec ==3.1.14.0,
---
 >              any.parsec ==3.1.15.0,
137c138
<              any.stm ==2.5.0.0,
---
 >              any.stm ==2.5.0.2,
148c149
<              any.template-haskell ==2.17.0.0,
---
 >              any.template-haskell ==2.18.0.0,
163c164
<              any.time ==1.9.3,
---
 >              any.time ==1.9.3 || ==1.11.1.1,

Cheers
Ben
-- 
I would rather have questions that cannot be answered, than answers that
cannot be questioned.  -- Richard Feynman




More information about the Haskell-Cafe mailing list