From 8997b11de7b5efa56b303a8dd8a33c173ce1fa3f Mon Sep 17 00:00:00 2001 From: Simon Jakobi Date: Tue, 4 Oct 2016 00:11:09 +0200 Subject: [PATCH] Parse .dump-hi files of library components only once This fixes a performance regression introduced in 5f3ffe5ea8b4d8d1f4d1e4d15bee8b481ec6a8d4. --- ChangeLog.md | 3 +++ src/Stack/Package.hs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 07c2fd2d33..48dfdd6404 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -54,6 +54,9 @@ Bug fixes: [#2568](https://github.com/commercialhaskell/stack/issues/2568) * Fixed running `stack hpc report` on package targets. [#2664](https://github.com/commercialhaskell/stack/issues/2664) +* Fix a long-standing performance regression where stack would parse the .dump-hi + files of the library components of local packages twice. + [#2658](https://github.com/commercialhaskell/stack/pull/2658) ## 1.2.0 diff --git a/src/Stack/Package.hs b/src/Stack/Package.hs index 6698fff462..5315408ddf 100644 --- a/src/Stack/Package.hs +++ b/src/Stack/Package.hs @@ -734,7 +734,7 @@ libraryFiles lib = do resolveFilesAndDeps Nothing (dirs ++ [dir]) - (names <> exposed) + names haskellModuleExts cfiles <- buildOtherSources build return (modules, files <> cfiles, warnings)