Skip to content

Commit

Permalink
Prevent dependency on private library
Browse files Browse the repository at this point in the history
  • Loading branch information
fgaz committed Jan 16, 2019
1 parent c3c29a4 commit af482b4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Cabal/Distribution/Simple/Configure.hs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ import Distribution.Types.LegacyExeDependency
import Distribution.Types.PkgconfigDependency
import Distribution.Types.LocalBuildInfo
import Distribution.Types.LibraryName
import Distribution.Types.LibraryVisibility
import Distribution.Types.ComponentRequestedSpec
import Distribution.Types.ForeignLib
import Distribution.Types.ForeignLibType
Expand Down Expand Up @@ -899,9 +900,9 @@ dependencySatisfiable

|| all
(\lib ->
(depName, CLibName lib)
`Map.member`
requiredDepsMap)
let maybeIPI =
(depName, CLibName lib) `Map.lookup` requiredDepsMap
in (Just LibraryVisibilityPublic) == (Installed.libVisibility <$> maybeIPI))
sublibs

| isInternalDep
Expand Down Expand Up @@ -965,7 +966,7 @@ configureFinalizedPackage verbosity cfg enabled
pkg_descr0
of Right r -> return r
Left missing ->
die' verbosity $ "Encountered missing dependencies:\n"
die' verbosity $ "Encountered missing or private dependencies:\n"
++ (render . nest 4 . sep . punctuate comma
. map (pretty . simplifyDependency)
$ missing)
Expand Down

0 comments on commit af482b4

Please sign in to comment.