{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -Wno-unused-top-binds -Wno-identities #-}
module Stack.Storage.Project
( initProjectStorage
, ConfigCacheKey
, configCacheKey
, loadConfigCache
, saveConfigCache
, deactiveConfigCache
) where
import qualified Data.ByteString as S
import qualified Data.Set as Set
import Database.Persist.Sqlite
( Entity (..), SelectOpt (..), SqlBackend, Unique, (=.)
, (==.), getBy, insert, selectList, update, updateWhere
)
import Database.Persist.TH
( mkMigrate, mkPersist, persistLowerCase, share
, sqlSettings
)
import Pantry.SQLite ( initStorage, withStorage_ )
import Stack.Prelude
import Stack.Storage.Util
( handleMigrationException, updateList, updateSet )
import Stack.Types.Build ( CachePkgSrc, ConfigCache (..) )
import Stack.Types.BuildConfig
( BuildConfig (..), HasBuildConfig (..) )
import Stack.Types.Cache ( ConfigCacheType )
import Stack.Types.ConfigureOpts ( ConfigureOpts (..) )
import Stack.Types.GhcPkgId ( GhcPkgId )
import Stack.Types.Storage ( ProjectStorage (..) )