File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/Distribution/Server/Packages Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -194,8 +194,15 @@ doPackageRender users info = PackageRender
194194 renderComponentName name@ (CNotLibName _) = componentNameRaw name
195195
196196allCondLibs :: GenericPackageDescription -> [(LibraryName , CondTree ConfVar [Dependency ] Library )]
197- allCondLibs desc = maybeToList ((LMainLibName ,) <$> condLibrary desc)
197+ allCondLibs desc = filter (isPublicCondLib . snd ) $
198+ maybeToList ((LMainLibName ,) <$> condLibrary desc)
198199 ++ (first LSubLibName <$> condSubLibraries desc)
200+ where
201+ -- Check if a conditional library tree contains a public library
202+ -- We check the root node since visibility is a property of the library itself
203+ isPublicCondLib condTree =
204+ let lib = condTreeData condTree
205+ in libName lib == LMainLibName || libVisibility lib == LibraryVisibilityPublic
199206
200207type DependencyTree = CondTree ConfVar [Dependency ] IsBuildable
201208
You can’t perform that action at this time.
0 commit comments