From ca7ae3917310b4589950a26b3482ef2a721eec8d Mon Sep 17 00:00:00 2001 From: Vance Palacio Date: Sun, 16 Dec 2018 20:06:29 -0800 Subject: [PATCH] Adds skipping for lib components. Fixes #3827 --- src/Stack/Build/Source.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Stack/Build/Source.hs b/src/Stack/Build/Source.hs index ff303254c1..8538697802 100644 --- a/src/Stack/Build/Source.hs +++ b/src/Stack/Build/Source.hs @@ -210,10 +210,11 @@ loadLocalPackage isLocal boptsCli targets (name, pp) = do let hasLibrary = case packageLibraries pkg of NoLibraries -> False - HasLibraries _ -> True + HasLibraries libs -> + not (Set.null $ filterSkippedComponents libs) in hasLibrary || not (Set.null nonLibComponents) - || not (Set.null $ packageInternalLibraries pkg) + || not (Set.null $ filterSkippedComponents $ packageInternalLibraries pkg) filterSkippedComponents = Set.filter (not . (`elem` boptsSkipComponents bopts))