alex icon indicating copy to clipboard operation
alex copied to clipboard

GHC-generated LINE annotation might cause non-deterministic build

Open cartazio opened this issue 8 years ago • 4 comments

AlexWrapper-basic copy.txt

theres thousands of newlines in that attached file! also some of the source / line attributions seem likely to cause nondeterminstic builds under some conditions eg


{-# LINE 1 "/var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/ghc64947_0/ghc_2.h" #-}

cc @hvr

cartazio avatar May 16 '17 02:05 cartazio

I agree that it would probably be nice to remove excessive newlines, but I can't see how these, or the source line attributions could cause non-deterministic builds. Can you generate a test case that show this?

erikd avatar May 16 '17 05:05 erikd

Ok so the non-determinacy comes from things like:

{-# LINE 1 "/var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/ghc64947_0/ghc_2.h" #-}

but does that come from Alex or GHC ?

erikd avatar May 16 '17 06:05 erikd

That looks a lot like a tmp-file generated by GHC... I wonder if GHC should #line-annotate positions in ephemeral tmp files... (especially if -keep-tmp-files is not active)

hvr avatar May 16 '17 06:05 hvr

Is this still a problem? Cannot reproduce atm.
We need a reproducer to report this upstream.

andreasabel avatar Jan 25 '22 08:01 andreasabel