Skip to content
  • Matthew Pickering's avatar
    a24b83dd
    Fix behaviour of -keep-tmp-files when used in OPTIONS_GHC pragma · a24b83dd
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    This fixes the behaviour of -keep-tmp-files when used in an OPTIONS_GHC
    pragma for files with module level scope.
    
    Instead of simple not deleting the files, we also need to remove them
    from the TmpFs so they are not deleted later on when all the other files
    are deleted.
    
    There are additional complications because you also need to remove the
    directory where these files live from the TmpFs so we don't try to
    delete those later either.
    
    I added two tests.
    
    1. Tests simply that -keep-tmp-files works at all with a single module
       and --make mode.
    2. The other tests that temporary files are deleted for other modules
       which don't enable -keep-tmp-files.
    
    Fixes #23339
    a24b83dd
    Fix behaviour of -keep-tmp-files when used in OPTIONS_GHC pragma
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    This fixes the behaviour of -keep-tmp-files when used in an OPTIONS_GHC
    pragma for files with module level scope.
    
    Instead of simple not deleting the files, we also need to remove them
    from the TmpFs so they are not deleted later on when all the other files
    are deleted.
    
    There are additional complications because you also need to remove the
    directory where these files live from the TmpFs so we don't try to
    delete those later either.
    
    I added two tests.
    
    1. Tests simply that -keep-tmp-files works at all with a single module
       and --make mode.
    2. The other tests that temporary files are deleted for other modules
       which don't enable -keep-tmp-files.
    
    Fixes #23339
Loading