Modulecabal-install-3.12.1.0Haskell2010
Distribution.Client.CmdInstall
cabal-install CLI command: build
- 6 values
- Packagecabal-install-3.12.1.0
- Exports6
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceCmdInstall.hs
The build CLI and action
2 declarationsThe install command actually serves four different needs. It installs:
* exes:
For example a program from hackage. The behavior is similar to the old
install command, except that now conflicts between separate runs of the
command are impossible thanks to the store.
Exes are installed in the store like a normal dependency, then they are
symlinked/copied in the directory specified by --installdir.
To do this we need a dummy projectBaseContext containing the targets as
extra packages and using a temporary dist directory.
* libraries
Libraries install through a similar process, but using GHC environment
files instead of symlinks. This means that 'v2-install'ing libraries
only works on GHC >= 8.0.
For more details on how this works, see the module Distribution.Client.ProjectOrchestration
Internals exposed for testing
2 declarationsThis defines what a TargetSelector means for the bench command.
It selects the AvailableTargets that the TargetSelector refers to,
or otherwise classifies the problem.
For the build command select all components except non-buildable
and disabled tests/benchmarks, fail if there are no such
components
For a TargetComponent TargetSelector, check if the component can be selected.
For the build command we just need the basic checks on being buildable etc.
Internals exposed for CmdRepl + CmdRun
2 declarationsestablishDummyProjectBaseContext :: Verbosity-> ProjectConfigProject configuration including the global config if needed
-> DistDirLayoutWhere to put the dist directory
-> [PackageSpecifier UnresolvedSourcePackage]The packages to be included in the project
-> CurrentCommand-> IO ProjectBaseContext
Create a dummy project context, without a .cabal or a .cabal.project file (a place where to put a temporary dist directory is still needed)