-
Notifications
You must be signed in to change notification settings - Fork 714
Support reinstalling more packages (including base and template-haskell) with GHC >=9.14 #10982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,7 +98,9 @@ import Distribution.Pretty | |
import Prelude () | ||
|
||
import Distribution.Compiler | ||
import Distribution.Package (PackageName) | ||
import Distribution.Simple.Utils | ||
import Distribution.Types.UnitId (UnitId) | ||
import Distribution.Utils.Path | ||
import Distribution.Version | ||
|
||
|
@@ -120,6 +122,11 @@ data Compiler = Compiler | |
-- ^ Supported language standards. | ||
, compilerExtensions :: [(Extension, Maybe CompilerFlag)] | ||
-- ^ Supported extensions. | ||
, compilerWiredInUnitIds :: Maybe [(PackageName, UnitId)] | ||
-- ^ 'UnitId's that the compiler doesn't support reinstalling. | ||
-- For instance, when using GHC plugins, one wants to use the | ||
-- exact same version of the `ghc` package as the one the | ||
-- compiler was linked against. | ||
Comment on lines
+125
to
+129
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
, compilerProperties :: Map String String | ||
-- ^ A key-value map for properties not covered by the above fields. | ||
} | ||
|
@@ -178,6 +185,7 @@ compilerInfo c = | |
(Just . compilerCompat $ c) | ||
(Just . map fst . compilerLanguages $ c) | ||
(Just . map fst . compilerExtensions $ c) | ||
(compilerWiredInUnitIds c) | ||
|
||
-- ------------------------------------------------------------ | ||
|
||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,14 @@ | ||||||
synopsis: Allow reinstalling packages like base and template-haskell for GHC>9.14 | ||||||
ulysses4ever marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the commit message also needs to be updated. |
||||||
packages: cabal-install | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line should include |
||||||
prs: #10982 | ||||||
issues: #10087 | ||||||
significance: significant | ||||||
|
||||||
description: { | ||||||
|
||||||
Historically cabal-install disallowed reinstalling packages like `base` and `template-haskell`. | ||||||
As of GHC-9.12, the reasons for this have been lifted. | ||||||
We update cabal-install to become aware of this and allow reinstalling more packages. | ||||||
Certain packages like `ghc` and `ghc-internal` still cannot be reinstalled. | ||||||
|
||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would help to describe the meaning of
Nothing
.