Skip to content

Commit 536461a

Browse files
committed
Filter out linker warnings on ghc 7.8
1 parent 9f01ebc commit 536461a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Stack/Build/Execute.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,6 +1686,7 @@ mungeBuildOutput excludeTHLoading makeAbsolute pkgDir = void $
16861686
CT.lines
16871687
=$ CL.map stripCR
16881688
=$ CL.filter (not . isTHLoading)
1689+
=$ CL.filter (not . isLinkerWarning)
16891690
=$ toAbsolute
16901691
where
16911692
-- | Is this line a Template Haskell "Loading package" line
@@ -1697,6 +1698,11 @@ mungeBuildOutput excludeTHLoading makeAbsolute pkgDir = void $
16971698
"Loading package " `T.isPrefixOf` bs &&
16981699
("done." `T.isSuffixOf` bs || "done.\r" `T.isSuffixOf` bs)
16991700

1701+
isLinkerWarning :: Text -> Bool
1702+
isLinkerWarning str =
1703+
("ghc.exe: warning:" `T.isPrefixOf` str || "ghc.EXE: warning:" `T.isPrefixOf` str) &&
1704+
"is linked instead of __imp_" `T.isInfixOf` str
1705+
17001706
-- | Convert GHC error lines with file paths to have absolute file paths
17011707
toAbsolute :: ConduitM Text Text m ()
17021708
toAbsolute = case makeAbsolute of

0 commit comments

Comments
 (0)