-
Notifications
You must be signed in to change notification settings - Fork 714
Open
Description
cabal-install
maintains a list of nonReinstallablePackages
, preventing certain packages being reinstalled by the user. This list needs some updates:
ghc-internal
(released with GHC 9.10) should be considered non-reinstallable, so it needs to be added to the list.- Following the excellent work by @TeofilC in https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12479, GHC 9.12 will allow reinstallation of the
template-haskell
package, so it can be removed from the list (cf. Marktemplate-haskell
non-upgradable (again) #4185). - GHC 9.12 will hopefully allow reinstallation of
base
; this is not yet fully implemented but is tracked in https://gitlab.haskell.org/ghc/ghc/-/issues/24903 (cc @mpickering).
The list of non-reinstallable packages does not currently depend on the compiler version. Really it should; is there an easy way to achieve this?
cabal/cabal-install/src/Distribution/Client/Dependency.hs
Lines 447 to 471 in dda541c
-- | The set of non-reinstallable packages includes those which cannot be | |
-- rebuilt using a GHC installation and Hackage-published source distribution. | |
-- There are a few reasons why this might be true: | |
-- | |
-- * the package overrides its unit ID (e.g. with ghc's @-this-unit-id@ flag), | |
-- which can result in multiple indistinguishable packages (having potentially | |
-- different ABIs) with the same unit ID. | |
-- | |
-- * the package contains definitions of wired-in declarations which tie | |
-- it to a particular compiler (e.g. we can't build link against | |
-- @base-4.18.0.0@ using GHC 9.6.1). | |
-- | |
-- * the package does not have a complete (that is, buildable) source distribution. | |
-- For instance, some packages provided by GHC rely on files outside of the | |
-- source tree generated by GHC's build system. | |
nonReinstallablePackages :: [PackageName] | |
nonReinstallablePackages = | |
[ mkPackageName "base" | |
, mkPackageName "ghc-bignum" | |
, mkPackageName "ghc-prim" | |
, mkPackageName "ghc" | |
, mkPackageName "integer-gmp" | |
, mkPackageName "integer-simple" | |
, mkPackageName "template-haskell" | |
] |