Skip to content

PartialDownsweep is sensitive to form of C compiler error messages

One of the things tested by the PartialDownsweep test is that a CPP preprocessor error fails as expected. However, this will cause the C preprocessor to emit an error to stderr. In general we have little control over the preprocessor; this environment sensitivity causes this test to fail on Windows, where cpp emits caret diagnostics:

--- ghc-api/downsweep/PartialDownsweep.run/PartialDownsweep.stderr.normalised	2019-11-07 13:07:07.259955900 +0000
+++ ghc-api/downsweep/PartialDownsweep.run/PartialDownsweep.run.stderr.normalised	2019-11-07 13:07:07.263867400 +0000
@@ -5,12 +5,12 @@
 
 B.hs:2:0:
      #elif without #if
-     #elif <- cpp error here
-     
+        2 | #elif <- cpp error here
+          | 
 == CPP preprocessor error with bypass
 
 B.hs:2:0:
      #elif without #if
-     #elif <- cpp error here
-     
+        2 | #elif <- cpp error here
+          | 
Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information