| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Stack.Build.ConstructPlan
Description
Construct a Plan for how to build
Synopsis
- constructPlan :: forall env. HasEnvConfig env => BaseConfigOpts -> [DumpPackage] -> (PackageLocationImmutable -> Map FlagName Bool -> [Text] -> [Text] -> RIO EnvConfig Package) -> SourceMap -> InstalledMap -> Bool -> RIO env Plan
Documentation
Arguments
| :: forall env. HasEnvConfig env | |
| => BaseConfigOpts | |
| -> [DumpPackage] | locally registered |
| -> (PackageLocationImmutable -> Map FlagName Bool -> [Text] -> [Text] -> RIO EnvConfig Package) | load upstream package |
| -> SourceMap | |
| -> InstalledMap | |
| -> Bool | |
| -> RIO env Plan |
Computes a build plan. This means figuring out which build Tasks to take,
and the interdependencies among the build Tasks. In particular:
1) It determines which packages need to be built, based on the transitive
deps of the current targets. For local packages, this is indicated by the
lpWanted 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.