stack-1.6.3: The Haskell Tool Stack

Safe HaskellNone
LanguageHaskell2010

Stack.Runners

Description

Utilities for running stack commands.

Synopsis

Documentation

withGlobalConfigAndLock :: GlobalOpts -> RIO Config () -> IO () Source #

Loads global config, ignoring any configuration which would be loaded due to $PWD.

withBuildConfigAndLockNoDocker :: GlobalOpts -> (Maybe FileLock -> RIO EnvConfig ()) -> IO () Source #

See issue #2010 for why this exists. Currently just used for the specific case of "stack clean --full".

withBuildConfigExt Source #

Arguments

:: Bool 
-> GlobalOpts 
-> Maybe (RIO Config ())

Action to perform before the build. This will be run on the host OS even if Docker is enabled for builds. The build config is not available in this action, since that would require build tools to be installed on the host OS.

-> (Maybe FileLock -> RIO EnvConfig ())

Action that uses the build config. If Docker is enabled for builds, this will be run in a Docker container.

-> Maybe (RIO Config ())

Action to perform after the build. This will be run on the host OS even if Docker is enabled for builds. The build config is not available in this action, since that would require build tools to be installed on the host OS.

-> IO () 

loadConfigWithOpts :: GlobalOpts -> (LoadConfig -> IO a) -> IO a Source #

Load the configuration. Convenience function used throughout this module.

withUserFileLock :: MonadUnliftIO m => GlobalOpts -> Path Abs Dir -> (Maybe FileLock -> m a) -> m a Source #

Enforce mutual exclusion of every action running via this function, on this path, on this users account.

A lock file is created inside the given directory. Currently, stack uses locks per-snapshot. In the future, stack may refine this to an even more fine-grain locking approach.

munlockFile :: MonadIO m => Maybe FileLock -> m () Source #

Unlock a lock file, if the value is Just