Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
9db9e696
Commit
9db9e696
authored
Jan 16, 2017
by
kristenk
Committed by
GitHub
Jan 16, 2017
Browse files
Merge pull request #4240 from grayjay/rename-install-base-libraries-flag
Rename --install-base-libraries to --allow-boot-library-installs.
parents
156fa102
b402c61c
Changes
19
Hide whitespace changes
Inline
Side-by-side
Cabal/doc/nix-local-build.rst
View file @
9db9e696
...
...
@@ -1663,9 +1663,9 @@ Most users generally won't need these.
The command line variant of this field is ``--(no-)strong-flags``.
.. cfg-field::
install-base-librarie
s: boolean
--
install-base-librarie
s
--no-
install-base-librarie
s
.. cfg-field::
allow-boot-library-install
s: boolean
--
allow-boot-library-install
s
--no-
allow-boot-library-install
s
:synopsis: Allow cabal to install or upgrade any package.
:default: False
...
...
@@ -1676,7 +1676,7 @@ Most users generally won't need these.
removes
the
restriction
.
The
command
line
variant
of
this
field
is
``--(
no
-)
install
-
base
-
librarie
s
``.
``--(
no
-)
allow
-
boot
-
library
-
install
s
``.
..
cfg
-
field
::
cabal
-
lib
-
version
:
version
--
cabal
-
lib
-
version
=
version
...
...
cabal-install/Distribution/Client/Config.hs
View file @
9db9e696
...
...
@@ -244,7 +244,7 @@ instance Semigroup SavedConfig where
installIndependentGoals
=
combine
installIndependentGoals
,
installShadowPkgs
=
combine
installShadowPkgs
,
installStrongFlags
=
combine
installStrongFlags
,
install
InstallBaseLibs
=
combine
installInstallBaseLib
s
,
install
AllowBootLibInstalls
=
combine
installAllowBootLibInstall
s
,
installReinstall
=
combine
installReinstall
,
installAvoidReinstalls
=
combine
installAvoidReinstalls
,
installOverrideReinstall
=
combine
installOverrideReinstall
,
...
...
cabal-install/Distribution/Client/Dependency.hs
View file @
9db9e696
...
...
@@ -51,7 +51,7 @@ module Distribution.Client.Dependency (
setAvoidReinstalls
,
setShadowPkgs
,
setStrongFlags
,
setInstall
BaseLib
s
,
set
AllowBootLib
Installs
,
setMaxBackjumps
,
setEnableBackjumping
,
setSolveExecutables
,
...
...
@@ -163,7 +163,7 @@ data DepResolverParams = DepResolverParams {
depResolverStrongFlags
::
StrongFlags
,
-- | Whether to allow base and its dependencies to be installed.
depResolver
InstallBaseLibs
::
InstallBaseLib
s
,
depResolver
AllowBootLibInstalls
::
AllowBootLibInstall
s
,
depResolverMaxBackjumps
::
Maybe
Int
,
depResolverEnableBackjumping
::
EnableBackjumping
,
...
...
@@ -193,7 +193,7 @@ showDepResolverParams p =
++
"
\n
avoid reinstalls: "
++
show
(
asBool
(
depResolverAvoidReinstalls
p
))
++
"
\n
shadow packages: "
++
show
(
asBool
(
depResolverShadowPkgs
p
))
++
"
\n
strong flags: "
++
show
(
asBool
(
depResolverStrongFlags
p
))
++
"
\n
install base librarie
s: "
++
show
(
asBool
(
depResolverInstall
BaseLib
s
p
))
++
"
\n
allow boot library install
s: "
++
show
(
asBool
(
depResolver
AllowBootLib
Installs
p
))
++
"
\n
max backjumps: "
++
maybe
"infinite"
show
(
depResolverMaxBackjumps
p
)
where
...
...
@@ -248,7 +248,7 @@ basicDepResolverParams installedPkgIndex sourcePkgIndex =
depResolverAvoidReinstalls
=
AvoidReinstalls
False
,
depResolverShadowPkgs
=
ShadowPkgs
False
,
depResolverStrongFlags
=
StrongFlags
False
,
depResolver
InstallBaseLibs
=
InstallBaseLib
s
False
,
depResolver
AllowBootLibInstalls
=
AllowBootLibInstall
s
False
,
depResolverMaxBackjumps
=
Nothing
,
depResolverEnableBackjumping
=
EnableBackjumping
True
,
depResolverSolveExecutables
=
SolveExecutables
True
,
...
...
@@ -321,10 +321,10 @@ setStrongFlags sf params =
depResolverStrongFlags
=
sf
}
set
InstallBaseLibs
::
InstallBaseLib
s
->
DepResolverParams
->
DepResolverParams
setInstall
BaseLib
s
i
params
=
set
AllowBootLibInstalls
::
AllowBootLibInstall
s
->
DepResolverParams
->
DepResolverParams
set
AllowBootLib
Installs
i
params
=
params
{
depResolverInstall
BaseLib
s
=
i
depResolver
AllowBootLib
Installs
=
i
}
setMaxBackjumps
::
Maybe
Int
->
DepResolverParams
->
DepResolverParams
...
...
@@ -662,7 +662,7 @@ resolveDependencies platform comp pkgConfigDB solver params =
$
fmap
(
validateSolverResult
platform
comp
indGoals
)
$
runSolver
solver
(
SolverConfig
reordGoals
cntConflicts
indGoals
noReinstalls
shadowing
strFlags
installBase
maxBkjumps
enableBj
shadowing
strFlags
allowBootLibs
maxBkjumps
enableBj
solveExes
order
)
platform
comp
installedPkgIndex
sourcePkgIndex
pkgConfigDB
preferences
constraints
targets
...
...
@@ -679,11 +679,11 @@ resolveDependencies platform comp pkgConfigDB solver params =
noReinstalls
shadowing
strFlags
installBase
allowBootLibs
maxBkjumps
enableBj
solveExes
order
)
=
if
asBool
(
depResolverInstall
BaseLib
s
params
)
order
)
=
if
asBool
(
depResolver
AllowBootLib
Installs
params
)
then
params
else
dontUpgradeNonUpgradeablePackages
params
...
...
@@ -911,7 +911,7 @@ resolveWithoutDependencies (DepResolverParams targets constraints
prefs
defpref
installedPkgIndex
sourcePkgIndex
_reorderGoals
_countConflicts
_indGoals
_avoidReinstalls
_shadowing
_strFlags
_maxBjumps
_enableBj
_solveExes
_
installBaseLib
s
_order
)
=
_solveExes
_
allowBootLibInstall
s
_order
)
=
collectEithers
$
map
selectPackage
(
Set
.
toList
targets
)
where
selectPackage
::
PackageName
->
Either
ResolveNoDepsError
UnresolvedSourcePackage
...
...
cabal-install/Distribution/Client/Fetch.hs
View file @
9db9e696
...
...
@@ -164,7 +164,7 @@ planPackages verbosity comp platform fetchFlags
.
setStrongFlags
strongFlags
.
set
InstallBaseLibs
installBaseLib
s
.
set
AllowBootLibInstalls
allowBootLibInstall
s
-- Reinstall the targets given on the command line so that the dep
-- resolver will decide that they need fetching, even if they're
...
...
@@ -183,7 +183,7 @@ planPackages verbosity comp platform fetchFlags
shadowPkgs
=
fromFlag
(
fetchShadowPkgs
fetchFlags
)
strongFlags
=
fromFlag
(
fetchStrongFlags
fetchFlags
)
maxBackjumps
=
fromFlag
(
fetchMaxBackjumps
fetchFlags
)
installBaseLibs
=
fromFlag
(
fetchInstallBaseLibs
fetchFlags
)
allowBootLibInstalls
=
fromFlag
(
fetchAllowBootLibInstalls
fetchFlags
)
checkTarget
::
UserTarget
->
IO
()
...
...
cabal-install/Distribution/Client/Freeze.hs
View file @
9db9e696
...
...
@@ -179,7 +179,7 @@ planPackages verbosity comp platform mSandboxPkgInfo freezeFlags
.
setStrongFlags
strongFlags
.
set
InstallBaseLibs
installBaseLib
s
.
set
AllowBootLibInstalls
allowBootLibInstall
s
.
addConstraints
[
let
pkg
=
pkgSpecifierTarget
pkgSpecifier
...
...
@@ -205,7 +205,7 @@ planPackages verbosity comp platform mSandboxPkgInfo freezeFlags
shadowPkgs
=
fromFlag
(
freezeShadowPkgs
freezeFlags
)
strongFlags
=
fromFlag
(
freezeStrongFlags
freezeFlags
)
maxBackjumps
=
fromFlag
(
freezeMaxBackjumps
freezeFlags
)
installBaseLibs
=
fromFlag
(
freezeInstallBaseLibs
freezeFlags
)
allowBootLibInstalls
=
fromFlag
(
freezeAllowBootLibInstalls
freezeFlags
)
-- | Remove all unneeded packages from an install plan.
...
...
cabal-install/Distribution/Client/Install.hs
View file @
9db9e696
...
...
@@ -388,7 +388,7 @@ planPackages comp platform mSandboxPkgInfo solver
.
setStrongFlags
strongFlags
.
set
InstallBaseLibs
installBaseLib
s
.
set
AllowBootLibInstalls
allowBootLibInstall
s
.
setPreferenceDefault
(
if
upgradeDeps
then
PreferAllLatest
else
PreferLatestForSelected
)
...
...
@@ -449,7 +449,7 @@ planPackages comp platform mSandboxPkgInfo solver
shadowPkgs
=
fromFlag
(
installShadowPkgs
installFlags
)
strongFlags
=
fromFlag
(
installStrongFlags
installFlags
)
maxBackjumps
=
fromFlag
(
installMaxBackjumps
installFlags
)
installBaseLibs
=
fromFlag
(
installInstallBaseLibs
installFlags
)
allowBootLibInstalls
=
fromFlag
(
installAllowBootLibInstalls
installFlags
)
upgradeDeps
=
fromFlag
(
installUpgradeDeps
installFlags
)
onlyDeps
=
fromFlag
(
installOnlyDeps
installFlags
)
allowOlder
=
fromMaybe
(
AllowOlder
RelaxDepsNone
)
...
...
cabal-install/Distribution/Client/ProjectConfig.hs
View file @
9db9e696
...
...
@@ -202,7 +202,7 @@ resolveSolverSettings ProjectConfig{
solverSettingReorderGoals
=
fromFlag
projectConfigReorderGoals
solverSettingCountConflicts
=
fromFlag
projectConfigCountConflicts
solverSettingStrongFlags
=
fromFlag
projectConfigStrongFlags
solverSetting
InstallBaseLibs
=
fromFlag
projectConfigInstall
BaseLib
s
solverSetting
AllowBootLibInstalls
=
fromFlag
projectConfig
AllowBootLib
Installs
solverSettingIndexState
=
fromFlagOrDefault
IndexStateHead
projectConfigIndexState
--solverSettingIndependentGoals = fromFlag projectConfigIndependentGoals
--solverSettingShadowPkgs = fromFlag projectConfigShadowPkgs
...
...
@@ -221,7 +221,7 @@ resolveSolverSettings ProjectConfig{
projectConfigReorderGoals
=
Flag
(
ReorderGoals
False
),
projectConfigCountConflicts
=
Flag
(
CountConflicts
True
),
projectConfigStrongFlags
=
Flag
(
StrongFlags
False
),
projectConfig
InstallBaseLibs
=
Flag
(
InstallBaseLib
s
False
)
projectConfig
AllowBootLibInstalls
=
Flag
(
AllowBootLibInstall
s
False
)
--projectConfigIndependentGoals = Flag False,
--projectConfigShadowPkgs = Flag False,
--projectConfigReinstall = Flag False,
...
...
cabal-install/Distribution/Client/ProjectConfig/Legacy.hs
View file @
9db9e696
...
...
@@ -306,7 +306,7 @@ convertLegacyAllPackageFlags globalFlags configFlags
--installIndependentGoals = projectConfigIndependentGoals,
--installShadowPkgs = projectConfigShadowPkgs,
installStrongFlags
=
projectConfigStrongFlags
,
install
InstallBaseLibs
=
projectConfigInstallBaseLib
s
install
AllowBootLibInstalls
=
projectConfigAllowBootLibInstall
s
}
=
installFlags
...
...
@@ -503,7 +503,7 @@ convertToLegacySharedConfig
installIndependentGoals
=
mempty
,
--projectConfigIndependentGoals,
installShadowPkgs
=
mempty
,
--projectConfigShadowPkgs,
installStrongFlags
=
projectConfigStrongFlags
,
install
InstallBaseLibs
=
projectConfigInstallBaseLib
s
,
install
AllowBootLibInstalls
=
projectConfigAllowBootLibInstall
s
,
installOnly
=
mempty
,
installOnlyDeps
=
projectConfigOnlyDeps
,
installIndexState
=
projectConfigIndexState
,
...
...
@@ -854,7 +854,7 @@ legacySharedConfigFieldDescrs =
,
"one-shot"
,
"jobs"
,
"keep-going"
,
"offline"
-- solver flags:
,
"max-backjumps"
,
"reorder-goals"
,
"count-conflicts"
,
"strong-flags"
,
"
install-base-librarie
s"
,
"index-state"
,
"
allow-boot-library-install
s"
,
"index-state"
]
.
commandOptionsToFields
)
(
installOptions
ParseArgs
)
...
...
cabal-install/Distribution/Client/ProjectConfig/Types.hs
View file @
9db9e696
...
...
@@ -182,7 +182,7 @@ data ProjectConfigShared
projectConfigReorderGoals
::
Flag
ReorderGoals
,
projectConfigCountConflicts
::
Flag
CountConflicts
,
projectConfigStrongFlags
::
Flag
StrongFlags
,
projectConfig
InstallBaseLibs
::
Flag
InstallBaseLib
s
projectConfig
AllowBootLibInstalls
::
Flag
AllowBootLibInstall
s
-- More things that only make sense for manual mode, not --local mode
-- too much control!
...
...
@@ -356,7 +356,7 @@ data SolverSettings
solverSettingReorderGoals
::
ReorderGoals
,
solverSettingCountConflicts
::
CountConflicts
,
solverSettingStrongFlags
::
StrongFlags
,
solverSetting
InstallBaseLibs
::
InstallBaseLib
s
,
solverSetting
AllowBootLibInstalls
::
AllowBootLibInstall
s
,
solverSettingIndexState
::
IndexState
-- Things that only make sense for manual mode, not --local mode
-- too much control!
...
...
cabal-install/Distribution/Client/ProjectPlanning.hs
View file @
9db9e696
...
...
@@ -931,7 +931,7 @@ planPackages comp platform solver SolverSettings{..}
.
setStrongFlags
solverSettingStrongFlags
.
set
InstallBaseLibs
solverSettingInstallBaseLib
s
.
set
AllowBootLibInstalls
solverSettingAllowBootLibInstall
s
--TODO: [required eventually] decide if we need to prefer installed for
-- global packages, or prefer latest even for global packages. Perhaps
...
...
cabal-install/Distribution/Client/Setup.hs
View file @
9db9e696
...
...
@@ -679,7 +679,7 @@ data FetchFlags = FetchFlags {
fetchIndependentGoals
::
Flag
IndependentGoals
,
fetchShadowPkgs
::
Flag
ShadowPkgs
,
fetchStrongFlags
::
Flag
StrongFlags
,
fetch
InstallBaseLibs
::
Flag
InstallBaseLib
s
,
fetch
AllowBootLibInstalls
::
Flag
AllowBootLibInstall
s
,
fetchVerbosity
::
Flag
Verbosity
}
...
...
@@ -695,7 +695,7 @@ defaultFetchFlags = FetchFlags {
fetchIndependentGoals
=
Flag
(
IndependentGoals
False
),
fetchShadowPkgs
=
Flag
(
ShadowPkgs
False
),
fetchStrongFlags
=
Flag
(
StrongFlags
False
),
fetch
InstallBaseLibs
=
Flag
(
InstallBaseLib
s
False
),
fetch
AllowBootLibInstalls
=
Flag
(
AllowBootLibInstall
s
False
),
fetchVerbosity
=
toFlag
normal
}
...
...
@@ -743,7 +743,7 @@ fetchCommand = CommandUI {
fetchIndependentGoals
(
\
v
flags
->
flags
{
fetchIndependentGoals
=
v
})
fetchShadowPkgs
(
\
v
flags
->
flags
{
fetchShadowPkgs
=
v
})
fetchStrongFlags
(
\
v
flags
->
flags
{
fetchStrongFlags
=
v
})
fetch
InstallBaseLibs
(
\
v
flags
->
flags
{
fetch
InstallBaseLibs
=
v
})
fetch
AllowBootLibInstalls
(
\
v
flags
->
flags
{
fetch
AllowBootLibInstalls
=
v
})
}
...
...
@@ -762,7 +762,7 @@ data FreezeFlags = FreezeFlags {
freezeIndependentGoals
::
Flag
IndependentGoals
,
freezeShadowPkgs
::
Flag
ShadowPkgs
,
freezeStrongFlags
::
Flag
StrongFlags
,
freeze
InstallBaseLibs
::
Flag
InstallBaseLib
s
,
freeze
AllowBootLibInstalls
::
Flag
AllowBootLibInstall
s
,
freezeVerbosity
::
Flag
Verbosity
}
...
...
@@ -778,7 +778,7 @@ defaultFreezeFlags = FreezeFlags {
freezeIndependentGoals
=
Flag
(
IndependentGoals
False
),
freezeShadowPkgs
=
Flag
(
ShadowPkgs
False
),
freezeStrongFlags
=
Flag
(
StrongFlags
False
),
freeze
InstallBaseLibs
=
Flag
(
InstallBaseLib
s
False
),
freeze
AllowBootLibInstalls
=
Flag
(
AllowBootLibInstall
s
False
),
freezeVerbosity
=
toFlag
normal
}
...
...
@@ -825,7 +825,7 @@ freezeCommand = CommandUI {
freezeIndependentGoals
(
\
v
flags
->
flags
{
freezeIndependentGoals
=
v
})
freezeShadowPkgs
(
\
v
flags
->
flags
{
freezeShadowPkgs
=
v
})
freezeStrongFlags
(
\
v
flags
->
flags
{
freezeStrongFlags
=
v
})
freeze
InstallBaseLibs
(
\
v
flags
->
flags
{
freeze
InstallBaseLibs
=
v
})
freeze
AllowBootLibInstalls
(
\
v
flags
->
flags
{
freeze
AllowBootLibInstalls
=
v
})
}
...
...
@@ -1245,7 +1245,7 @@ data InstallFlags = InstallFlags {
installIndependentGoals
::
Flag
IndependentGoals
,
installShadowPkgs
::
Flag
ShadowPkgs
,
installStrongFlags
::
Flag
StrongFlags
,
install
InstallBaseLibs
::
Flag
InstallBaseLib
s
,
install
AllowBootLibInstalls
::
Flag
AllowBootLibInstall
s
,
installReinstall
::
Flag
Bool
,
installAvoidReinstalls
::
Flag
AvoidReinstalls
,
installOverrideReinstall
::
Flag
Bool
,
...
...
@@ -1288,7 +1288,7 @@ defaultInstallFlags = InstallFlags {
installIndependentGoals
=
Flag
(
IndependentGoals
False
),
installShadowPkgs
=
Flag
(
ShadowPkgs
False
),
installStrongFlags
=
Flag
(
StrongFlags
False
),
install
InstallBaseLibs
=
Flag
(
InstallBaseLib
s
False
),
install
AllowBootLibInstalls
=
Flag
(
AllowBootLibInstall
s
False
),
installReinstall
=
Flag
False
,
installAvoidReinstalls
=
Flag
(
AvoidReinstalls
False
),
installOverrideReinstall
=
Flag
False
,
...
...
@@ -1437,7 +1437,7 @@ installOptions showOrParseArgs =
installIndependentGoals
(
\
v
flags
->
flags
{
installIndependentGoals
=
v
})
installShadowPkgs
(
\
v
flags
->
flags
{
installShadowPkgs
=
v
})
installStrongFlags
(
\
v
flags
->
flags
{
installStrongFlags
=
v
})
install
InstallBaseLibs
(
\
v
flags
->
flags
{
install
InstallBaseLibs
=
v
})
++
install
AllowBootLibInstalls
(
\
v
flags
->
flags
{
install
AllowBootLibInstalls
=
v
})
++
[
option
[]
[
"reinstall"
]
"Install even if it means installing the same version again."
...
...
@@ -2222,7 +2222,7 @@ optionSolverFlags :: ShowOrParseArgs
->
(
flags
->
Flag
IndependentGoals
)
->
(
Flag
IndependentGoals
->
flags
->
flags
)
->
(
flags
->
Flag
ShadowPkgs
)
->
(
Flag
ShadowPkgs
->
flags
->
flags
)
->
(
flags
->
Flag
StrongFlags
)
->
(
Flag
StrongFlags
->
flags
->
flags
)
->
(
flags
->
Flag
Install
BaseLib
s
)
->
(
Flag
InstallBaseLibs
->
flags
->
flags
)
->
(
flags
->
Flag
AllowBootLib
Installs
)
->
(
Flag
AllowBootLibInstalls
->
flags
->
flags
)
->
[
OptionField
flags
]
optionSolverFlags
showOrParseArgs
getmbj
setmbj
getrg
setrg
getcc
setcc
_getig
_setig
getsip
setsip
getstrfl
setstrfl
getib
setib
=
...
...
@@ -2259,10 +2259,10 @@ optionSolverFlags showOrParseArgs getmbj setmbj getrg setrg getcc setcc _getig _
(
fmap
asBool
.
getstrfl
)
(
setstrfl
.
fmap
StrongFlags
)
(
yesNoOpt
showOrParseArgs
)
,
option
[]
[
"
install-base-librarie
s"
]
,
option
[]
[
"
allow-boot-library-install
s"
]
"Allow cabal to install base, ghc-prim, integer-simple, integer-gmp, and template-haskell."
(
fmap
asBool
.
getib
)
(
setib
.
fmap
Install
BaseLib
s
)
(
setib
.
fmap
AllowBootLib
Installs
)
(
yesNoOpt
showOrParseArgs
)
]
...
...
cabal-install/Distribution/Solver/Modular/Solver.hs
View file @
9db9e696
...
...
@@ -60,7 +60,7 @@ data SolverConfig = SolverConfig {
avoidReinstalls
::
AvoidReinstalls
,
shadowPkgs
::
ShadowPkgs
,
strongFlags
::
StrongFlags
,
installBaseLibs
::
InstallBaseLib
s
,
allowBootLibInstalls
::
AllowBootLibInstall
s
,
maxBackjumps
::
Maybe
Int
,
enableBackjumping
::
EnableBackjumping
,
solveExecutables
::
SolveExecutables
,
...
...
@@ -115,7 +115,7 @@ solve sc cinfo idx pkgConfigDB userPrefs userConstraints userGoals =
validateLinking
idx
.
validateTree
cinfo
idx
pkgConfigDB
prunePhase
=
(
if
asBool
(
avoidReinstalls
sc
)
then
P
.
avoidReinstalls
(
const
True
)
else
id
)
.
(
if
asBool
(
installBaseLib
s
sc
)
(
if
asBool
(
allowBootLibInstall
s
sc
)
then
id
else
P
.
requireInstalled
(`
elem
`
nonInstallable
))
buildPhase
=
traceTree
"build.json"
id
...
...
cabal-install/Distribution/Solver/Types/Settings.hs
View file @
9db9e696
...
...
@@ -6,7 +6,7 @@ module Distribution.Solver.Types.Settings
,
AvoidReinstalls
(
..
)
,
ShadowPkgs
(
..
)
,
StrongFlags
(
..
)
,
Install
BaseLib
s
(
..
)
,
AllowBootLib
Installs
(
..
)
,
EnableBackjumping
(
..
)
,
CountConflicts
(
..
)
,
SolveExecutables
(
..
)
...
...
@@ -34,7 +34,7 @@ newtype ShadowPkgs = ShadowPkgs Bool
newtype
StrongFlags
=
StrongFlags
Bool
deriving
(
BooleanFlag
,
Eq
,
Generic
,
Show
)
newtype
InstallBaseLibs
=
InstallBaseLib
s
Bool
newtype
AllowBootLibInstalls
=
AllowBootLibInstall
s
Bool
deriving
(
BooleanFlag
,
Eq
,
Generic
,
Show
)
newtype
EnableBackjumping
=
EnableBackjumping
Bool
...
...
@@ -49,5 +49,5 @@ instance Binary IndependentGoals
instance
Binary
AvoidReinstalls
instance
Binary
ShadowPkgs
instance
Binary
StrongFlags
instance
Binary
Install
BaseLib
s
instance
Binary
AllowBootLib
Installs
instance
Binary
SolveExecutables
cabal-install/changelog
View file @
9db9e696
...
...
@@ -32,8 +32,8 @@
*
Support
the
Nix
package
manager
(#
3651
).
*
Made
the
'template-haskell'
package
non
-
upgradable
again
(#
4185
).
*
Fixed
password
echoing
on
MinTTY
(#
4128
).
*
Added
a
new
solver
flag
,
'--
install-base-librarie
s'
,
that
allows
any
package
to
be
installed
or
upgraded
(#
4209
).
*
Added
a
new
solver
flag
,
'--
allow-boot-library-install
s'
,
that
allows
any
package
to
be
installed
or
upgraded
(#
4209
).
1.24.0.0
Ryan
Thomas
<
ryan
@
ryant
.
org
>
March
2016
*
If
there
are
multiple
remote
repos
,
'cabal update'
now
updates
...
...
cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs
View file @
9db9e696
...
...
@@ -604,8 +604,8 @@ instance Arbitrary CountConflicts where
instance
Arbitrary
StrongFlags
where
arbitrary
=
StrongFlags
<$>
arbitrary
instance
Arbitrary
Install
BaseLib
s
where
arbitrary
=
Install
BaseLib
s
<$>
arbitrary
instance
Arbitrary
AllowBootLib
Installs
where
arbitrary
=
AllowBootLib
Installs
<$>
arbitrary
instance
Arbitrary
AllowNewer
where
arbitrary
=
AllowNewer
<$>
arbitrary
...
...
cabal-install/tests/UnitTests/Distribution/Solver/Modular/DSL.hs
View file @
9db9e696
...
...
@@ -523,14 +523,14 @@ exResolve :: ExampleDb
->
Maybe
Int
->
IndependentGoals
->
ReorderGoals
->
Install
BaseLib
s
->
AllowBootLib
Installs
->
EnableBackjumping
->
Maybe
[
ExampleVar
]
->
[
ExPreference
]
->
EnableAllTests
->
Progress
String
String
CI
.
SolverInstallPlan
.
SolverInstallPlan
exResolve
db
exts
langs
pkgConfigDb
targets
solver
mbj
indepGoals
reorder
installBaseLib
s
enableBj
vars
prefs
enableAllTests
allowBootLibInstall
s
enableBj
vars
prefs
enableAllTests
=
resolveDependencies
C
.
buildPlatform
compiler
pkgConfigDb
solver
params
where
defaultCompiler
=
C
.
unknownCompilerInfo
C
.
buildCompilerId
C
.
NoAbiTag
...
...
@@ -555,7 +555,7 @@ exResolve db exts langs pkgConfigDb targets solver mbj indepGoals reorder
$
setIndependentGoals
indepGoals
$
setReorderGoals
reorder
$
setMaxBackjumps
mbj
$
set
InstallBaseLibs
installBaseLib
s
$
set
AllowBootLibInstalls
allowBootLibInstall
s
$
setEnableBackjumping
enableBj
$
setGoalOrder
goalOrder
$
standardInstallPolicy
instIdx
avaiIdx
targets'
...
...
cabal-install/tests/UnitTests/Distribution/Solver/Modular/DSL/TestCaseUtils.hs
View file @
9db9e696
...
...
@@ -4,7 +4,7 @@ module UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils (
SolverTest
,
SolverResult
(
..
)
,
independentGoals
,
installBaseLib
s
,
allowBootLibInstall
s
,
disableBackjumping
,
goalOrder
,
preferences
...
...
@@ -41,8 +41,9 @@ import UnitTests.Options
independentGoals
::
SolverTest
->
SolverTest
independentGoals
test
=
test
{
testIndepGoals
=
IndependentGoals
True
}
installBaseLibs
::
SolverTest
->
SolverTest
installBaseLibs
test
=
test
{
testInstallBaseLibs
=
InstallBaseLibs
True
}
allowBootLibInstalls
::
SolverTest
->
SolverTest
allowBootLibInstalls
test
=
test
{
testAllowBootLibInstalls
=
AllowBootLibInstalls
True
}
disableBackjumping
::
SolverTest
->
SolverTest
disableBackjumping
test
=
...
...
@@ -66,7 +67,7 @@ data SolverTest = SolverTest {
,
testTargets
::
[
String
]
,
testResult
::
SolverResult
,
testIndepGoals
::
IndependentGoals
,
test
InstallBaseLibs
::
InstallBaseLib
s
,
test
AllowBootLibInstalls
::
AllowBootLibInstall
s
,
testEnableBackjumping
::
EnableBackjumping
,
testGoalOrder
::
Maybe
[
ExampleVar
]
,
testSoftConstraints
::
[
ExPreference
]
...
...
@@ -156,7 +157,7 @@ mkTestExtLangPC exts langs pkgConfigDb db label targets result = SolverTest {
,
testTargets
=
targets
,
testResult
=
result
,
testIndepGoals
=
IndependentGoals
False
,
test
InstallBaseLibs
=
InstallBaseLib
s
False
,
test
AllowBootLibInstalls
=
AllowBootLibInstall
s
False
,
testEnableBackjumping
=
EnableBackjumping
True
,
testGoalOrder
=
Nothing
,
testSoftConstraints
=
[]
...
...
@@ -173,7 +174,7 @@ runTest SolverTest{..} = askOption $ \(OptionShowSolverLog showSolverLog) ->
let
progress
=
exResolve
testDb
testSupportedExts
testSupportedLangs
testPkgConfigDb
testTargets
Modular
Nothing
testIndepGoals
(
ReorderGoals
False
)
testInstall
BaseLib
s
testEnableBackjumping
testGoalOrder
test
AllowBootLib
Installs
testEnableBackjumping
testGoalOrder
testSoftConstraints
testEnableAllTests
printMsg
msg
=
if
showSolverLog
then
putStrLn
msg
...
...
cabal-install/tests/UnitTests/Distribution/Solver/Modular/QuickCheck.hs
View file @
9db9e696
...
...
@@ -108,7 +108,7 @@ solve enableBj reorder indep solver targets (TestDb db) =
-- The backjump limit prevents individual tests from using
-- too much time and memory.
(
Just
defaultMaxBackjumps
)
indep
reorder
(
Install
BaseLib
s
False
)
enableBj
Nothing
[]
indep
reorder
(
AllowBootLib
Installs
False
)
enableBj
Nothing
[]
(
EnableAllTests
True
)
failure
::
String
->
Failure
...
...
cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs
View file @
9db9e696
...
...
@@ -78,9 +78,9 @@ tests = [
,
runTest
$
mkTest
db12
"baseShim6"
[
"E"
]
(
solverSuccess
[(
"E"
,
1
),
(
"syb"
,
2
)])
]
,
testGroup
"Base"
[
runTest
$
mkTest
dbBase
"Refuse to install base without --
install-base-librarie
s"
[
"base"
]
$
runTest
$
mkTest
dbBase
"Refuse to install base without --
allow-boot-library-install
s"
[
"base"
]
$
solverFailure
(
isInfixOf
"only already installed instances can be used"
)
,
runTest
$
installBaseLib
s
$
mkTest
dbBase
"Install base with --
install-base-librarie
s"
[
"base"
]
$
,
runTest
$
allowBootLibInstall
s
$
mkTest
dbBase
"Install base with --
allow-boot-library-install
s"
[
"base"
]
$
solverSuccess
[(
"base"
,
1
),
(
"ghc-prim"
,
1
),
(
"integer-gmp"
,
1
),
(
"integer-simple"
,
1
)]
]
,
testGroup
"Cycles"
[
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment