diff mbox series

[bug#35907] guix import hackage: update list of ghc-includedpackages

Message ID 20190525201102.14630-1-rob@vllmrt.net
State Accepted
Headers show
Series [bug#35907] guix import hackage: update list of ghc-includedpackages | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Robert Vollmert May 25, 2019, 8:11 p.m. UTC
Update the list of excepted dependencies for current ghc-8.4,
based on the release notes at
https://downloads.haskell.org/~ghc/8.4.3/docs/html/users_guide/8.4.3-notes.html

Particularly, this adds `text` to the list, which is a dependency
of `parsec` which was already on the list before, causing build
failures with updated versions of the `text` package.

* guix/import/hackage.scm (ghc-standard-libraries): Update list.
---
 guix/import/hackage.scm | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

Comments

Robert Vollmert May 28, 2019, 1:39 p.m. UTC | #1
Note that I’m not sure it’s actually a good idea to exclude (all of) these packages
from the dependencies: They’re mostly bundled with ghc because they are used in the
ghc build. As such, it might well be that future ghc versions switch out e.g.
“bytestring” for some alternate data structure, which would then require changes to
all package definitions that currently silently depend on “bytestring”.

Should I include a patch to remove the explicitly packaged `ghc-text` and other
packages of this type?
Ricardo Wurmus June 1, 2019, 4:16 a.m. UTC | #2
Hi Robert,

> Note that I’m not sure it’s actually a good idea to exclude (all of) these packages
> from the dependencies: They’re mostly bundled with ghc because they are used in the
> ghc build. As such, it might well be that future ghc versions switch out e.g.
> “bytestring” for some alternate data structure, which would then require changes to
> all package definitions that currently silently depend on “bytestring”.

While this is correct, we cannot seem to remove them from the
environment when building packages.  If we allow these packages to be
added as inputs and these packages are at different versions from what
GHC provides we get into trouble.

This happened in the past, unfortunately, and it’s hard to debug.

> Should I include a patch to remove the explicitly packaged `ghc-text` and other
> packages of this type?

Yes, I think this would be good.

Thank you for working on this!

--
Ricardo
Ricardo Wurmus June 1, 2019, 4:24 a.m. UTC | #3
Hi Robert,

> Update the list of excepted dependencies for current ghc-8.4,
> based on the release notes at
> https://downloads.haskell.org/~ghc/8.4.3/docs/html/users_guide/8.4.3-notes.html
>
> Particularly, this adds `text` to the list, which is a dependency
> of `parsec` which was already on the list before, causing build
> failures with updated versions of the `text` package.
>
> * guix/import/hackage.scm (ghc-standard-libraries): Update list.

I made a minor change to the commit message (it’s hard to get this
right) and pushed this change to the master branch with commit
1cc12357a6.

Thank you!

--
Ricardo
diff mbox series

Patch

diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index c97b16197f..bc72f21bf3 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -52,34 +52,35 @@ 
             hackage-package?))
 
 (define ghc-standard-libraries
-  ;; List of libraries distributed with ghc (7.10.2). We include GHC itself as
-  ;; some packages list it.
-  '("array"
+  ;; List of libraries distributed with ghc (8.4.3).
+  ;; https://downloads.haskell.org/~ghc/8.4.3/docs/html/users_guide/8.4.3-notes.html
+  '("ghc"
+    "cabal" ;; in the output of `ghc-pkg list` Cabal is uppercased, but
+            ;; hackage-name->package-name takes this into account.
+    "win32" ;; similarly uppercased
+    "array"
     "base"
-    "bin-package-db"
     "binary"
     "bytestring"
-    "cabal" ;; in the output of `ghc-pkg list` Cabal is uppercased, but
-            ;; hackage-name->package-name takes this into account.
     "containers"
     "deepseq"
     "directory"
     "filepath"
-    "ghc"
+    "ghc-boot"
+    "ghc-compact"
     "ghc-prim"
+    "ghci"
     "haskeline"
-    "hoopl"
     "hpc"
     "integer-gmp"
-    "pretty"
+    "mtl"
+    "parsec"
     "process"
-    "rts"
     "template-haskell"
-    "terminfo"
+    "text"
     "time"
     "transformers"
     "unix"
-    "win32"
     "xhtml"))
 
 (define package-name-prefix "ghc-")