Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Distribution.Client.ProjectBuilding.PackageFileMonitor
Synopsis
- data PackageFileMonitor = PackageFileMonitor {}
- type BuildResultMisc = (DocsResult, TestsResult)
- newPackageFileMonitor :: ElaboratedSharedConfig -> DistDirLayout -> DistDirParams -> PackageFileMonitor
- packageFileMonitorKeyValues :: ElaboratedConfiguredPackage -> (ElaboratedConfiguredPackage, Set ComponentName)
- checkPackageFileMonitorChanged :: PackageFileMonitor -> ElaboratedConfiguredPackage -> FilePath -> [BuildStatus] -> IO (Either BuildStatusRebuild BuildResult)
- updatePackageConfigFileMonitor :: PackageFileMonitor -> FilePath -> ElaboratedConfiguredPackage -> IO ()
- updatePackageBuildFileMonitor :: PackageFileMonitor -> FilePath -> MonitorTimestamp -> ElaboratedConfiguredPackage -> BuildStatusRebuild -> [MonitorFilePath] -> BuildResultMisc -> IO ()
- updatePackageRegFileMonitor :: PackageFileMonitor -> FilePath -> Maybe InstalledPackageInfo -> IO ()
- invalidatePackageRegFileMonitor :: PackageFileMonitor -> IO ()
Documentation
data PackageFileMonitor Source #
As part of the dry run for local unpacked packages we have to check if the
package config or files have changed. That is the purpose of
PackageFileMonitor
and checkPackageFileMonitorChanged
.
When a package is (re)built, the monitor must be updated to reflect the new
state of the package. Because we sometimes build without reconfiguring the
state updates are split into two, one for package config changes and one
for other changes. This is the purpose of updatePackageConfigFileMonitor
and updatePackageBuildFileMonitor
.
Constructors
PackageFileMonitor | |
type BuildResultMisc = (DocsResult, TestsResult) Source #
This is all the components of the BuildResult
other than the
[
.InstalledPackageInfo
]
We have to split up the BuildResult
components since they get produced
at different times (or rather, when different things change).
newPackageFileMonitor :: ElaboratedSharedConfig -> DistDirLayout -> DistDirParams -> PackageFileMonitor Source #
packageFileMonitorKeyValues :: ElaboratedConfiguredPackage -> (ElaboratedConfiguredPackage, Set ComponentName) Source #
Helper function for checkPackageFileMonitorChanged
,
updatePackageConfigFileMonitor
and updatePackageBuildFileMonitor
.
It selects the info from a ElaboratedConfiguredPackage
that are used by
the FileMonitor
s (in the PackageFileMonitor
) to detect value changes.
checkPackageFileMonitorChanged :: PackageFileMonitor -> ElaboratedConfiguredPackage -> FilePath -> [BuildStatus] -> IO (Either BuildStatusRebuild BuildResult) Source #
Do all the checks on whether a package has changed and thus needs either rebuilding or reconfiguring and rebuilding.
updatePackageConfigFileMonitor :: PackageFileMonitor -> FilePath -> ElaboratedConfiguredPackage -> IO () Source #
updatePackageBuildFileMonitor :: PackageFileMonitor -> FilePath -> MonitorTimestamp -> ElaboratedConfiguredPackage -> BuildStatusRebuild -> [MonitorFilePath] -> BuildResultMisc -> IO () Source #
updatePackageRegFileMonitor :: PackageFileMonitor -> FilePath -> Maybe InstalledPackageInfo -> IO () Source #