Skip to content

Commit

Permalink
Adds skipping for lib components. Fixes commercialhaskell#3827
Browse files Browse the repository at this point in the history
  • Loading branch information
vanceism7 committed Dec 17, 2018
1 parent caf032b commit ca7ae39
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Stack/Build/Source.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit ca7ae39

Please sign in to comment.