License | BSD-3-Clause |
---|---|
Safe Haskell | None |
Language | GHC2021 |
Stack.Build.ConstructPlan
Description
Construct a Plan
for how to build.
Synopsis
- constructPlan :: HasEnvConfig env => BaseConfigOpts -> [DumpPackage] -> (PackageLocationImmutable -> Map FlagName Bool -> [Text] -> [Text] -> RIO EnvConfig Package) -> SourceMap -> InstalledMap -> Bool -> RIO env Plan
Documentation
Arguments
:: HasEnvConfig env | |
=> BaseConfigOpts | |
-> [DumpPackage] | locally registered |
-> (PackageLocationImmutable -> Map FlagName Bool -> [Text] -> [Text] -> RIO EnvConfig Package) | load upstream package |
-> SourceMap | |
-> InstalledMap | |
-> Bool | Only include initial build steps required for GHCi? |
-> RIO env Plan |
Computes a build plan. This means figuring out which build Task
s to
take, and the interdependencies among the build Task
s. In particular:
1) It determines which packages need to be built, based on the transitive
deps of the current targets. For project packages, this is indicated by the
wanted
boolean. For extra packages to build, this comes
from the extraToBuild0
argument of type Set PackageName
. These are
usually packages that have been specified on the command line.
2) It will only rebuild an upstream package if it isn't present in the
InstalledMap
, or if some of its dependencies have changed.
3) It will only rebuild a local package if its files are dirty or some of its dependencies have changed.