stack-2.14.0: The Haskell Tool Stack
Safe HaskellSafe-Inferred
LanguageGHC2021

Stack.Build.Cache

Description

Cache information about previous builds

Synopsis

Documentation

tryGetBuildCache :: HasEnvConfig env => Path Abs Dir -> NamedComponent -> RIO env (Maybe (Map FilePath FileCacheInfo)) Source #

Try to read the dirtiness cache for the given package directory.

tryGetConfigCache :: HasEnvConfig env => Path Abs Dir -> RIO env (Maybe ConfigCache) Source #

Try to read the dirtiness cache for the given package directory.

tryGetCabalMod :: HasEnvConfig env => Path Abs Dir -> RIO env (Maybe CTime) Source #

Try to read the mod time of the Cabal file from the last build

tryGetSetupConfigMod :: HasEnvConfig env => Path Abs Dir -> RIO env (Maybe CTime) Source #

Try to read the mod time of setup-config file from the last build

tryGetPackageProjectRoot :: HasEnvConfig env => Path Abs Dir -> RIO env (Maybe ByteString) Source #

Try to read the project root from the last build of a package

getInstalledExes :: HasEnvConfig env => InstallLocation -> RIO env [PackageIdentifier] Source #

Get all of the installed executables

tryGetFlagCache :: HasEnvConfig env => Installed -> RIO env (Maybe ConfigCache) Source #

Loads the flag cache for the given installed extra-deps

deleteCaches :: HasEnvConfig env => Path Abs Dir -> RIO env () Source #

Delete the caches for the project.

markExeInstalled :: HasEnvConfig env => InstallLocation -> PackageIdentifier -> RIO env () Source #

Mark the given executable as installed

markExeNotInstalled :: HasEnvConfig env => InstallLocation -> PackageIdentifier -> RIO env () Source #

Mark the given executable as not installed

writeBuildCache :: HasEnvConfig env => Path Abs Dir -> NamedComponent -> Map FilePath FileCacheInfo -> RIO env () Source #

Write the dirtiness cache for this package's files.

writeConfigCache :: HasEnvConfig env => Path Abs Dir -> ConfigCache -> RIO env () Source #

Write the dirtiness cache for this package's configuration.

data TestStatus Source #

Status of a test suite

Constructors

TSSuccess 
TSFailure 
TSUnknown 

setTestStatus :: HasEnvConfig env => Path Abs Dir -> TestStatus -> RIO env () Source #

Mark test suite status

getTestStatus :: HasEnvConfig env => Path Abs Dir -> RIO env TestStatus Source #

Check if the test suite already passed

writePrecompiledCache Source #

Arguments

:: HasEnvConfig env 
=> BaseConfigOpts 
-> PackageLocationImmutable 
-> ConfigureOpts 
-> Bool

build haddocks

-> Installed

library

-> [GhcPkgId]

sublibraries, in the GhcPkgId format

-> Set Text

executables

-> RIO env () 

Write out information about a newly built package

readPrecompiledCache Source #

Arguments

:: forall env. HasEnvConfig env 
=> PackageLocationImmutable

target package

-> ConfigureOpts 
-> Bool

build haddocks

-> RIO env (Maybe (PrecompiledCache Abs)) 

Check the cache for a precompiled package matching the given configuration.

newtype BuildCache Source #

Stored on disk to know whether the files have changed.

Constructors

BuildCache 

Fields

Instances

Instances details
FromJSON BuildCache Source # 
Instance details

Defined in Stack.Types.Build

ToJSON BuildCache Source # 
Instance details

Defined in Stack.Types.Build

Generic BuildCache Source # 
Instance details

Defined in Stack.Types.Build

Associated Types

type Rep BuildCache :: Type -> Type #

Show BuildCache Source # 
Instance details

Defined in Stack.Types.Build

NFData BuildCache Source # 
Instance details

Defined in Stack.Types.Build

Methods

rnf :: BuildCache -> () #

Eq BuildCache Source # 
Instance details

Defined in Stack.Types.Build

type Rep BuildCache Source # 
Instance details

Defined in Stack.Types.Build

type Rep BuildCache = D1 ('MetaData "BuildCache" "Stack.Types.Build" "stack-2.14.0-CKI3CqdNSm89Q6MbWoYM52" 'True) (C1 ('MetaCons "BuildCache" 'PrefixI 'True) (S1 ('MetaSel ('Just "buildCacheTimes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map FilePath FileCacheInfo))))