stack-2.3.3: The Haskell Tool Stack

Safe HaskellNone
LanguageHaskell2010

Stack.Storage.Project

Description

Work with SQLite database used for caches across a single project.

Synopsis

Documentation

initProjectStorage Source #

Arguments

:: HasLogFunc env 
=> Path Abs File

storage file

-> (ProjectStorage -> RIO env a) 
-> RIO env a 

Initialize the database.

type ConfigCacheKey = Unique ConfigCacheParent Source #

Key used to retrieve configuration or flag cache

configCacheKey :: Path Abs Dir -> ConfigCacheType -> ConfigCacheKey Source #

Build key used to retrieve configuration or flag cache

saveConfigCache :: (HasBuildConfig env, HasLogFunc env) => ConfigCacheKey -> ConfigCache -> RIO env () Source #

Insert or update ConfigCache to the database.

deactiveConfigCache :: HasBuildConfig env => ConfigCacheKey -> RIO env () Source #

Mark ConfigCache as inactive in the database. We use a flag instead of deleting the records since, in most cases, the same cache will be written again within in a few seconds (after `cabal configure`), so this avoids unnecessary database churn.