Skip to content

Commit

Permalink
PD check: do not treat library names as package names
Browse files Browse the repository at this point in the history
Fixes #9122
  • Loading branch information
fgaz committed Jul 16, 2023
1 parent 1723d22 commit 6249e02
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Cabal/src/Distribution/PackageDescription/Check.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1352,18 +1352,13 @@ checkFields pkg =
, isNoVersion vr
]

internalLibraries =
map
(maybe (packageName pkg) unqualComponentNameToPackageName . libraryNameString . libName)
(allLibraries pkg)

internalExecutables = map exeName $ executables pkg

internalLibDeps =
[ dep
| bi <- allBuildInfo pkg
, dep@(Dependency name _ _) <- targetBuildDepends bi
, name `elem` internalLibraries
, name == packageName pkg
]

internalExeDeps =
Expand Down

0 comments on commit 6249e02

Please sign in to comment.