[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 
< constraints: any.Cabal ==,
 > constraints: any.Cabal ==,
<              any.base ==,
 >              any.base ==,
<              any.binary ==,
 >              any.binary ==,
<              any.bytestring ==,
 >              any.bytestring ==,
<              any.containers ==,
 >              any.containers ==,
<              any.deepseq ==,
 >              any.deepseq ==,
<              any.filepath ==,
 >              any.filepath ==,
<              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,
 >              haskeline +examples +terminfo,
<              any.parsec ==,
 >              any.parsec ==,
<              any.stm ==,
 >              any.stm ==,
<              any.template-haskell ==,
 >              any.template-haskell ==,
<              any.time ==1.9.3,
 >              any.time ==1.9.3 || ==,

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