Skip to content

Commit

Permalink
feat: completely remove sublibrary dependency warning check
Browse files Browse the repository at this point in the history
  • Loading branch information
theobat committed Nov 23, 2023
1 parent f2a2ae5 commit e5d292d
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions src/Stack/Build.hs
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ build msetLocalFiles = do
depsLocals <- localDependencies
let allLocals = locals <> depsLocals

-- checkSubLibraryDependencies (Map.elems $ smProject sourceMap)

boptsCli <- view $ envConfigL.to envConfigBuildOptsCLI
-- Set local files, necessary for file watching
stackYaml <- view stackYamlL
Expand Down Expand Up @@ -371,34 +369,3 @@ checkComponentsBuildable lps =
| lp <- lps
, c <- Set.toList (lpUnbuildable lp)
]

-- | Find if any sub-library dependency (other than internal libraries) exists
-- in each project package.
-- checkSubLibraryDependencies :: HasTerm env => [ProjectPackage] -> RIO env ()
-- checkSubLibraryDependencies projectPackages =
-- forM_ projectPackages $ \projectPackage -> do
-- C.GenericPackageDescription pkgDesc _ _ lib subLibs foreignLibs exes tests benches <-
-- liftIO $ cpGPD . ppCommon $ projectPackage

-- let pName = pkgName . C.package $ pkgDesc
-- dependencies = concatMap getDeps subLibs <>
-- concatMap getDeps foreignLibs <>
-- concatMap getDeps exes <>
-- concatMap getDeps tests <>
-- concatMap getDeps benches <>
-- maybe [] C.condTreeConstraints lib
-- notInternal (Dependency pName' _ _) = pName' /= pName
-- publicDependencies = filter notInternal dependencies
-- publicLibraries = concatMap (toList . depLibraries) publicDependencies

-- when (subLibDepExist publicLibraries) $
-- prettyWarnS
-- "Sublibrary dependency is not supported, this will almost certainly \
-- \fail."
-- where
-- getDeps (_, C.CondNode _ dep _) = dep
-- subLibDepExist = any
-- ( \case
-- C.LSubLibName _ -> True
-- C.LMainLibName -> False
-- )

0 comments on commit e5d292d

Please sign in to comment.