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

Stack.Build.Source

Synopsis

Documentation

projectLocalPackages :: HasEnvConfig env => RIO env [LocalPackage] Source #

loads and returns project packages

localDependencies :: HasEnvConfig env => RIO env [LocalPackage] Source #

loads all local dependencies - project packages and local extra-deps

loadLocalPackage :: forall env. (HasBuildConfig env, HasSourceMap env) => ProjectPackage -> RIO env LocalPackage Source #

Upgrade the initial project package info to a full-blown LocalPackage based on the selected components

loadSourceMap :: HasBuildConfig env => SMTargets -> BuildOptsCLI -> SMActual DumpedGlobalPackage -> RIO env SourceMap Source #

Given the parsed targets and build command line options constructs a source map

getLocalFlags :: BuildOptsCLI -> PackageName -> Map FlagName Bool Source #

All flags for a local package.

addUnlistedToBuildCache :: HasEnvConfig env => Package -> Path Abs File -> Set NamedComponent -> Map NamedComponent (Map FilePath a) -> RIO env (Map NamedComponent [Map FilePath FileCacheInfo], [PackageWarning]) Source #

Returns entries to add to the build cache for any newly found unlisted modules

hashSourceMapData :: (HasBuildConfig env, HasCompiler env) => BuildOptsCLI -> SourceMap -> RIO env SourceMapHash Source #

Get a SourceMapHash for a given SourceMap

Basic rules:

  • If someone modifies a GHC installation in any way after Stack looks at it, they voided the warranty. This includes installing a brand new build to the same directory, or registering new packages to the global database.
  • We should include everything in the hash that would relate to immutable packages and identifying the compiler itself. Mutable packages (both project packages and dependencies) will never make it into the snapshot database, and can be ignored.
  • Target information is only relevant insofar as it effects the dependency map. The actual current targets for this build are irrelevant to the cache mechanism, and can be ignored.
  • Make sure things like profiling and haddocks are included in the hash