Skip to content
  • Rebecca Turner's avatar
    a191f0a2
    Deduplicate `LD_LIBRARY_PATH` when running tests (#8728) · a191f0a2
    Rebecca Turner authored
    
    
    * Deduplicate `LD_LIBRARY_PATH` when running tests
    
    When Cabal runs a test suite, it adds all the dependent libraries to
    `LD_LIBRARY_PATH`. In some cases, this can exceed the operating system's
    `ARG_MAX` limit:
    
        dist/build/test/test: createProcess: posix_spawnp: resource exhausted (Argument list too long)
    
    However, many of the entries (observed as high as 75%!) in `LD_LIBRARY_PATH`
    are duplicates. Deduplicating the list with `Data.List.nub` fixes this error.
    
    This error was originally observed when testing a large commercial
    Haskell project (the mercury.com backend). Ideally, `depLibraryPaths`
    would be fixed to not return duplicate entries, but this fixup is
    low-cost and effective.
    
    * Add changelog entries
    
    ---------
    
    Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
    a191f0a2
    Deduplicate `LD_LIBRARY_PATH` when running tests (#8728)
    Rebecca Turner authored
    
    
    * Deduplicate `LD_LIBRARY_PATH` when running tests
    
    When Cabal runs a test suite, it adds all the dependent libraries to
    `LD_LIBRARY_PATH`. In some cases, this can exceed the operating system's
    `ARG_MAX` limit:
    
        dist/build/test/test: createProcess: posix_spawnp: resource exhausted (Argument list too long)
    
    However, many of the entries (observed as high as 75%!) in `LD_LIBRARY_PATH`
    are duplicates. Deduplicating the list with `Data.List.nub` fixes this error.
    
    This error was originally observed when testing a large commercial
    Haskell project (the mercury.com backend). Ideally, `depLibraryPaths`
    would be fixed to not return duplicate entries, but this fixup is
    low-cost and effective.
    
    * Add changelog entries
    
    ---------
    
    Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Loading