unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#37434] [PATCH 1/2] gnu: ghc-megaparsec: Update to 7.0.5.
@ 2019-09-17  3:37 ericbavier
  2019-09-17  3:37 ` [bug#37435] [PATCH 2/2] gnu: idris: Update to 1.3.2 ericbavier
  2019-09-20 20:32 ` [bug#37434] [PATCH 1/2] gnu: ghc-megaparsec: Update to 7.0.5 Ludovic Courtès
  0 siblings, 2 replies; 12+ messages in thread
From: ericbavier @ 2019-09-17  3:37 UTC (permalink / raw)
  To: 37434; +Cc: Eric Bavier

From: Eric Bavier <bavier@member.fsf.org>

* gnu/packages/haskell.scm (ghc-megaparsec): Update to 7.0.5
[arguments]: Remove field.
---
 gnu/packages/haskell.scm | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 8787f10789..960068ab23 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -4050,7 +4050,7 @@ combinators.")
 (define-public ghc-megaparsec
   (package
     (name "ghc-megaparsec")
-    (version "6.5.0")
+    (version "7.0.5")
     (source
      (origin
        (method url-fetch)
@@ -4059,11 +4059,8 @@ combinators.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "12iggy7qpf8x93jm64zf0g215xwy779bqyfyjk2bhmxqqr1yzgdy"))))
+         "0bqx1icbmk8s7wmbcdzsgnlh607c7kzg8l80cp02dxr5valjxp7j"))))
     (build-system haskell-build-system)
-    (arguments
-     `(#:cabal-revision
-       ("4" "0ij3asi5vwlhbgwsy6nhli9a0qb7926mg809fsgyl1rnhs9fvpx1")))
     (inputs
      `(("ghc-case-insensitive" ,ghc-case-insensitive)
        ("ghc-parser-combinators" ,ghc-parser-combinators)
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#37435] [PATCH 2/2] gnu: idris: Update to 1.3.2.
  2019-09-17  3:37 [bug#37434] [PATCH 1/2] gnu: ghc-megaparsec: Update to 7.0.5 ericbavier
@ 2019-09-17  3:37 ` ericbavier
  2019-09-20 20:32 ` [bug#37434] [PATCH 1/2] gnu: ghc-megaparsec: Update to 7.0.5 Ludovic Courtès
  1 sibling, 0 replies; 12+ messages in thread
From: ericbavier @ 2019-09-17  3:37 UTC (permalink / raw)
  To: 37435; +Cc: Eric Bavier

From: Eric Bavier <bavier@member.fsf.org>

* gnu/packages/idris.scm (ghc-network-2.8): New variable.
(idris): Update to 1.3.2.
[source]: Remove patch.
[inputs]: Use ghc-network-2.8.
* gnu/packages/patches/idris-test-no-node.patch: Delete.
* gnu/local.mk (dist_patch_DATA): Remove it.
---
 gnu/local.mk                                  |  1 -
 gnu/packages/idris.scm                        | 24 ++++++--
 gnu/packages/patches/idris-test-no-node.patch | 61 -------------------
 3 files changed, 20 insertions(+), 66 deletions(-)
 delete mode 100644 gnu/packages/patches/idris-test-no-node.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 16b63bc951..4beee88e38 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -946,7 +946,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch  \
   %D%/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch  \
   %D%/packages/patches/id3lib-CVE-2007-4460.patch			\
-  %D%/packages/patches/idris-test-no-node.patch			\
   %D%/packages/patches/ilmbase-fix-tests.patch			\
   %D%/packages/patches/intltool-perl-compatibility.patch	\
   %D%/packages/patches/irrlicht-use-system-libs.patch		\
diff --git a/gnu/packages/idris.scm b/gnu/packages/idris.scm
index 4290d8c21f..376db9cb05 100644
--- a/gnu/packages/idris.scm
+++ b/gnu/packages/idris.scm
@@ -35,10 +35,27 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages))
 
+;;; Until we update our default GHC to >=8.6 we cannot update our ghc-network
+;;; package, since the 'cabal-install' package that supports the current
+;;; 'Cabal' module requires 'network==2.6.*'.  Providing a local ghc-network
+;;; works in this case since we use it only for a standalone program.
+(define ghc-network-2.8
+  (package
+    (inherit ghc-network)
+    (version "2.8.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://hackage.haskell.org/package/network/"
+                           "network-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0im8k51rw3ahmr23ny10pshwbz09jfg0fdpam0hzf2hgxnzmvxb1"))))))
+
 (define-public idris
   (package
     (name "idris")
-    (version "1.3.1")
+    (version "1.3.2")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -46,8 +63,7 @@
                     "idris-" version "/idris-" version ".tar.gz"))
               (sha256
                (base32
-                "0fn9h58l592j72njwma1ia48h8h87wi2rjqfxs7j2lfmvgfv18fi"))
-              (patches (search-patches "idris-test-no-node.patch"))))
+                "0wychzkg0yghd2pp8fqz78vp1ayzks191knfpl7mhh8igsmb6bc7"))))
     (build-system haskell-build-system)
     (native-inputs                      ;For tests
      `(("perl" ,perl)
@@ -72,7 +88,7 @@
        ("ghc-ieee754" ,ghc-ieee754)
        ("ghc-libffi" ,ghc-libffi)
        ("ghc-megaparsec" ,ghc-megaparsec)
-       ("ghc-network" ,ghc-network)
+       ("ghc-network" ,ghc-network-2.8)
        ("ghc-optparse-applicative" ,ghc-optparse-applicative)
        ("ghc-regex-tdfa" ,ghc-regex-tdfa)
        ("ghc-safe" ,ghc-safe)
diff --git a/gnu/packages/patches/idris-test-no-node.patch b/gnu/packages/patches/idris-test-no-node.patch
deleted file mode 100644
index c04ad41a8e..0000000000
--- a/gnu/packages/patches/idris-test-no-node.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 6c52e1b902b869c25e2fe39cff6364143a04da61 Mon Sep 17 00:00:00 2001
-From: Niklas Larsson <niklas@mm.st>
-Date: Tue, 11 Dec 2018 19:56:22 +0100
-Subject: [PATCH] Only check for Node when required
-
----
- test/TestRun.hs | 34 ++++++++++++++++++++--------------
- 1 file changed, 20 insertions(+), 14 deletions(-)
-
-diff --git a/test/TestRun.hs b/test/TestRun.hs
-index c7db9fdcd..4809911f3 100644
---- a/test/TestRun.hs
-+++ b/test/TestRun.hs
-@@ -11,6 +11,7 @@ import Data.Proxy
- import Data.Typeable
- import Options.Applicative
- import System.Directory
-+import System.Environment
- import System.Exit
- import System.FilePath ((</>))
- import System.Info
-@@ -103,20 +104,25 @@ runTest path flags = do
-       normalise (x : xs) = x : normalise xs
-       normalise [] = []
- 
-+checkNode :: IO  ()
-+checkNode = do
-+    nodePath   <- findExecutable "node"
-+    nodejsPath <- findExecutable "nodejs"
-+    let node = nodePath <|> nodejsPath
-+    case node of
-+      Nothing -> do
-+        putStrLn "For running the test suite against Node, node must be installed."
-+        exitFailure
-+      Just _  -> return ()
-+
- main :: IO ()
- main = do
--  nodePath   <- findExecutable "node"
--  nodejsPath <- findExecutable "nodejs"
--  let node = nodePath <|> nodejsPath
--  case node of
--    Nothing -> do
--      putStrLn "For running the test suite against Node, node must be installed."
--      exitFailure
--    Just _  -> do
--      defaultMainWithIngredients ingredients $
-+    args <- getArgs
-+    when ("--node" `elem` args) checkNode
-+    defaultMainWithIngredients ingredients $
-         askOption $ \(NodeOpt node) ->
--          let (codegen, flags) = if node then (JS, ["--codegen", "node"])
--                                         else (C , [])
--           in
--            mkGoldenTests (testFamiliesForCodegen codegen)
--                        (flags ++ idrisFlags)
-+            let (codegen, flags) = if node then (JS, ["--codegen", "node"])
-+                                           else (C , [])
-+            in
-+                mkGoldenTests (testFamiliesForCodegen codegen) (flags ++ idrisFlags)
-+
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#37434] [PATCH 1/2] gnu: ghc-megaparsec: Update to 7.0.5.
  2019-09-17  3:37 [bug#37434] [PATCH 1/2] gnu: ghc-megaparsec: Update to 7.0.5 ericbavier
  2019-09-17  3:37 ` [bug#37435] [PATCH 2/2] gnu: idris: Update to 1.3.2 ericbavier
@ 2019-09-20 20:32 ` Ludovic Courtès
  2019-09-20 22:21   ` Timothy Sample
  1 sibling, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2019-09-20 20:32 UTC (permalink / raw)
  To: ericbavier; +Cc: 37434, Eric Bavier

Hi Eric,

ericbavier@centurylink.net skribis:

> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/haskell.scm (ghc-megaparsec): Update to 7.0.5
> [arguments]: Remove field.

Since <https://www.stackage.org/lts-14.6> lists megaparsec 7.0.5, I
think this is OK.  Am I right, Timothy?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#37434] [PATCH 1/2] gnu: ghc-megaparsec: Update to 7.0.5.
  2019-09-20 20:32 ` [bug#37434] [PATCH 1/2] gnu: ghc-megaparsec: Update to 7.0.5 Ludovic Courtès
@ 2019-09-20 22:21   ` Timothy Sample
  2019-09-20 22:25     ` Timothy Sample
  0 siblings, 1 reply; 12+ messages in thread
From: Timothy Sample @ 2019-09-20 22:21 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 37434, Eric Bavier, ericbavier

Hi Ludo and Eric,

Ludovic Courtès <ludo@gnu.org> writes:

> ericbavier@centurylink.net skribis:
>
>> From: Eric Bavier <bavier@member.fsf.org>
>>
>> * gnu/packages/haskell.scm (ghc-megaparsec): Update to 7.0.5
>> [arguments]: Remove field.
>
> Since <https://www.stackage.org/lts-14.6> lists megaparsec 7.0.5, I
> think this is OK.  Am I right, Timothy?

No!  :)

Stackage LTS 14 targets GHC 8.6, which we are not (yet) using for
Haskell builds.  We still use GHC 8.4, so we follow Stackage LTS 12
(<https://www.stackage.org/lts-12>), which lists megaparsec at 1.0.0.


-- Tim

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#37434] [PATCH 1/2] gnu: ghc-megaparsec: Update to 7.0.5.
  2019-09-20 22:21   ` Timothy Sample
@ 2019-09-20 22:25     ` Timothy Sample
  2019-09-23  8:25       ` Ludovic Courtès
  0 siblings, 1 reply; 12+ messages in thread
From: Timothy Sample @ 2019-09-20 22:25 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 37434, Eric Bavier, ericbavier

Timothy Sample <samplet@ngyro.com> writes:

> Stackage LTS 14 targets GHC 8.6, which we are not (yet) using for
> Haskell builds.  We still use GHC 8.4, so we follow Stackage LTS 12
> (<https://www.stackage.org/lts-12>), which lists megaparsec at 1.0.0.

That should 6.5.0.  Sorry!  I was looking at hspec-megaparsec.


-- Tim

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#37434] [PATCH 1/2] gnu: ghc-megaparsec: Update to 7.0.5.
  2019-09-20 22:25     ` Timothy Sample
@ 2019-09-23  8:25       ` Ludovic Courtès
  2019-09-24  1:59         ` Eric Bavier
  0 siblings, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2019-09-23  8:25 UTC (permalink / raw)
  To: Timothy Sample; +Cc: 37434, Eric Bavier, ericbavier

Hello!

Timothy Sample <samplet@ngyro.com> skribis:

> Timothy Sample <samplet@ngyro.com> writes:
>
>> Stackage LTS 14 targets GHC 8.6, which we are not (yet) using for
>> Haskell builds.  We still use GHC 8.4, so we follow Stackage LTS 12
>> (<https://www.stackage.org/lts-12>), which lists megaparsec at 1.0.0.
>
> That should 6.5.0.

OK, got it—I had “LTS” right but the number wrong, which is
unfortunate.  :-)

Eric, could you adjust accordingly?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#37434] [PATCH 1/2] gnu: ghc-megaparsec: Update to 7.0.5.
  2019-09-23  8:25       ` Ludovic Courtès
@ 2019-09-24  1:59         ` Eric Bavier
  2019-09-24  7:16           ` Ludovic Courtès
  0 siblings, 1 reply; 12+ messages in thread
From: Eric Bavier @ 2019-09-24  1:59 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 37434, bavier

Idris 1.3.2 unfortunately needs megaparsec>=7.0.4.

FWIW, idris is our only package that depends on ghc-megaparsec. :)  So maybe an upgrade is fine?

I was under the impression that our 'guix refresh' updater was supposed to use the appropriate stackage version?  But it seems to be referencing version 14.6.


----- On Sep 23, 2019, at 3:25 AM, Ludovic Courtès ludo@gnu.org wrote:

> Hello!
> 
> Timothy Sample <samplet@ngyro.com> skribis:
> 
>> Timothy Sample <samplet@ngyro.com> writes:
>>
>>> Stackage LTS 14 targets GHC 8.6, which we are not (yet) using for
>>> Haskell builds.  We still use GHC 8.4, so we follow Stackage LTS 12
>>> (<https://www.stackage.org/lts-12>), which lists megaparsec at 1.0.0.
>>
>> That should 6.5.0.
> 
> OK, got it—I had “LTS” right but the number wrong, which is
> unfortunate.  :-)
> 
> Eric, could you adjust accordingly?
> 
> Thanks,
> Ludo’.

-- 
`~Eric

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#37434] [PATCH 1/2] gnu: ghc-megaparsec: Update to 7.0.5.
  2019-09-24  1:59         ` Eric Bavier
@ 2019-09-24  7:16           ` Ludovic Courtès
  2019-09-24 14:06             ` Eric Bavier
  0 siblings, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2019-09-24  7:16 UTC (permalink / raw)
  To: Eric Bavier; +Cc: 37434, bavier

Hello,

Eric Bavier <ericbavier@centurylink.net> skribis:

> Idris 1.3.2 unfortunately needs megaparsec>=7.0.4.
>
> FWIW, idris is our only package that depends on ghc-megaparsec. :)  So maybe an upgrade is fine?

For the sake of consistency, what about adding a variant of megaparsec
for use by Idris, and keeping the LTS-12 version?

> I was under the impression that our 'guix refresh' updater was supposed to use the appropriate stackage version?  But it seems to be referencing version 14.6.

Looking at ‘latest-lts-release’ in (guix import stackage), the updater
seems to just take the latest LTS version.

We should probably fix that by having the argument to
‘stackage-lts-info-fetch’ default to the currently targeted LTS version.
Otherwise one has to know the LTS version and pass it to ‘guix import
stackage --lts-version’, which is error-prone.

Thoughts?

Ludo’.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#37434] [PATCH 1/2] gnu: ghc-megaparsec: Update to 7.0.5.
  2019-09-24  7:16           ` Ludovic Courtès
@ 2019-09-24 14:06             ` Eric Bavier
  2019-09-24 17:08               ` Ludovic Courtès
  2019-09-25 17:49               ` Timothy Sample
  0 siblings, 2 replies; 12+ messages in thread
From: Eric Bavier @ 2019-09-24 14:06 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 37434, bavier

[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]


----- On Sep 24, 2019, at 2:16 AM, Ludovic Courtès ludo@gnu.org wrote:

> Hello,
> 
> Eric Bavier <ericbavier@centurylink.net> skribis:
> 
>> Idris 1.3.2 unfortunately needs megaparsec>=7.0.4.
>>
>> FWIW, idris is our only package that depends on ghc-megaparsec. :)  So maybe an
>> upgrade is fine?
> 
> For the sake of consistency, what about adding a variant of megaparsec
> for use by Idris, and keeping the LTS-12 version?

That sounds appropriate to me.  New patch attached.

> 
>> I was under the impression that our 'guix refresh' updater was supposed to use
>> the appropriate stackage version?  But it seems to be referencing version 14.6.
> 
> Looking at ‘latest-lts-release’ in (guix import stackage), the updater
> seems to just take the latest LTS version.
> 
> We should probably fix that by having the argument to
> ‘stackage-lts-info-fetch’ default to the currently targeted LTS version.
> Otherwise one has to know the LTS version and pass it to ‘guix import
> stackage --lts-version’, which is error-prone.
> 
> Thoughts?

I think that would be the right thing to do, imo.

-- 
`~Eric

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-idris-Update-to-1.3.2.patch --]
[-- Type: text/x-patch; name=0001-gnu-idris-Update-to-1.3.2.patch, Size: 6718 bytes --]

From 832529b71c2c5c7e6aa6e88a206c0db65e8a0c2e Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Mon, 16 Sep 2019 22:20:23 -0500
Subject: [PATCH] gnu: idris: Update to 1.3.2.

* gnu/packages/idris.scm (ghc-network-2.8, ghc-megaparsec-7): New variables.
(idris): Update to 1.3.2.
[source]: Remove patch.
[inputs]: Use ghc-network-2.8 and ghc-megaparsec-7.
* gnu/packages/patches/idris-test-no-node.patch: Delete.
* gnu/local.mk (dist_patch_DATA): Remove it.
---
 gnu/local.mk                                  |  1 -
 gnu/packages/idris.scm                        | 44 +++++++++++--
 gnu/packages/patches/idris-test-no-node.patch | 61 -------------------
 3 files changed, 39 insertions(+), 67 deletions(-)
 delete mode 100644 gnu/packages/patches/idris-test-no-node.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 16b63bc951..4beee88e38 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -946,7 +946,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch  \
   %D%/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch  \
   %D%/packages/patches/id3lib-CVE-2007-4460.patch			\
-  %D%/packages/patches/idris-test-no-node.patch			\
   %D%/packages/patches/ilmbase-fix-tests.patch			\
   %D%/packages/patches/intltool-perl-compatibility.patch	\
   %D%/packages/patches/irrlicht-use-system-libs.patch		\
diff --git a/gnu/packages/idris.scm b/gnu/packages/idris.scm
index 4290d8c21f..39b732482f 100644
--- a/gnu/packages/idris.scm
+++ b/gnu/packages/idris.scm
@@ -30,15 +30,50 @@
   #:use-module (gnu packages perl)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system haskell)
+  #:use-module (guix utils)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages))
 
+;;; Until we update our default GHC to >=8.6 we cannot update our ghc-network
+;;; package, since the 'cabal-install' package that supports the current
+;;; 'Cabal' module requires 'network==2.6.*'.  Providing a local ghc-network
+;;; works in this case since we use it only for a standalone program.
+(define ghc-network-2.8
+  (package
+    (inherit ghc-network)
+    (version "2.8.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://hackage.haskell.org/package/network/"
+                           "network-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0im8k51rw3ahmr23ny10pshwbz09jfg0fdpam0hzf2hgxnzmvxb1"))))))
+
+;;; Similarly, Idris 1.3.2 requires 'megaparse>=7.0.4' but we'd like to keep
+;;; the public package at the current Stackage LTS version:
+(define ghc-megaparsec-7
+  (package
+    (inherit ghc-megaparsec)
+    (version "7.0.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://hackage.haskell.org/package/megaparsec/"
+                           "megaparsec-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0bqx1icbmk8s7wmbcdzsgnlh607c7kzg8l80cp02dxr5valjxp7j"))))
+    (arguments (strip-keyword-arguments (list #:cabal-revision)
+                                        (package-arguments ghc-megaparsec)))))
+
 (define-public idris
   (package
     (name "idris")
-    (version "1.3.1")
+    (version "1.3.2")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -46,8 +81,7 @@
                     "idris-" version "/idris-" version ".tar.gz"))
               (sha256
                (base32
-                "0fn9h58l592j72njwma1ia48h8h87wi2rjqfxs7j2lfmvgfv18fi"))
-              (patches (search-patches "idris-test-no-node.patch"))))
+                "0wychzkg0yghd2pp8fqz78vp1ayzks191knfpl7mhh8igsmb6bc7"))))
     (build-system haskell-build-system)
     (native-inputs                      ;For tests
      `(("perl" ,perl)
@@ -71,8 +105,8 @@
        ("ghc-fsnotify" ,ghc-fsnotify)
        ("ghc-ieee754" ,ghc-ieee754)
        ("ghc-libffi" ,ghc-libffi)
-       ("ghc-megaparsec" ,ghc-megaparsec)
-       ("ghc-network" ,ghc-network)
+       ("ghc-megaparsec" ,ghc-megaparsec-7)
+       ("ghc-network" ,ghc-network-2.8)
        ("ghc-optparse-applicative" ,ghc-optparse-applicative)
        ("ghc-regex-tdfa" ,ghc-regex-tdfa)
        ("ghc-safe" ,ghc-safe)
diff --git a/gnu/packages/patches/idris-test-no-node.patch b/gnu/packages/patches/idris-test-no-node.patch
deleted file mode 100644
index c04ad41a8e..0000000000
--- a/gnu/packages/patches/idris-test-no-node.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 6c52e1b902b869c25e2fe39cff6364143a04da61 Mon Sep 17 00:00:00 2001
-From: Niklas Larsson <niklas@mm.st>
-Date: Tue, 11 Dec 2018 19:56:22 +0100
-Subject: [PATCH] Only check for Node when required
-
----
- test/TestRun.hs | 34 ++++++++++++++++++++--------------
- 1 file changed, 20 insertions(+), 14 deletions(-)
-
-diff --git a/test/TestRun.hs b/test/TestRun.hs
-index c7db9fdcd..4809911f3 100644
---- a/test/TestRun.hs
-+++ b/test/TestRun.hs
-@@ -11,6 +11,7 @@ import Data.Proxy
- import Data.Typeable
- import Options.Applicative
- import System.Directory
-+import System.Environment
- import System.Exit
- import System.FilePath ((</>))
- import System.Info
-@@ -103,20 +104,25 @@ runTest path flags = do
-       normalise (x : xs) = x : normalise xs
-       normalise [] = []
- 
-+checkNode :: IO  ()
-+checkNode = do
-+    nodePath   <- findExecutable "node"
-+    nodejsPath <- findExecutable "nodejs"
-+    let node = nodePath <|> nodejsPath
-+    case node of
-+      Nothing -> do
-+        putStrLn "For running the test suite against Node, node must be installed."
-+        exitFailure
-+      Just _  -> return ()
-+
- main :: IO ()
- main = do
--  nodePath   <- findExecutable "node"
--  nodejsPath <- findExecutable "nodejs"
--  let node = nodePath <|> nodejsPath
--  case node of
--    Nothing -> do
--      putStrLn "For running the test suite against Node, node must be installed."
--      exitFailure
--    Just _  -> do
--      defaultMainWithIngredients ingredients $
-+    args <- getArgs
-+    when ("--node" `elem` args) checkNode
-+    defaultMainWithIngredients ingredients $
-         askOption $ \(NodeOpt node) ->
--          let (codegen, flags) = if node then (JS, ["--codegen", "node"])
--                                         else (C , [])
--           in
--            mkGoldenTests (testFamiliesForCodegen codegen)
--                        (flags ++ idrisFlags)
-+            let (codegen, flags) = if node then (JS, ["--codegen", "node"])
-+                                           else (C , [])
-+            in
-+                mkGoldenTests (testFamiliesForCodegen codegen) (flags ++ idrisFlags)
-+
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [bug#37434] [PATCH 1/2] gnu: ghc-megaparsec: Update to 7.0.5.
  2019-09-24 14:06             ` Eric Bavier
@ 2019-09-24 17:08               ` Ludovic Courtès
  2019-09-25  2:20                 ` bug#37435: " Eric Bavier
  2019-09-25 17:49               ` Timothy Sample
  1 sibling, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2019-09-24 17:08 UTC (permalink / raw)
  To: Eric Bavier; +Cc: 37434, bavier

Hi Eric,

Eric Bavier <ericbavier@centurylink.net> skribis:

> From 832529b71c2c5c7e6aa6e88a206c0db65e8a0c2e Mon Sep 17 00:00:00 2001
> From: Eric Bavier <bavier@member.fsf.org>
> Date: Mon, 16 Sep 2019 22:20:23 -0500
> Subject: [PATCH] gnu: idris: Update to 1.3.2.
>
> * gnu/packages/idris.scm (ghc-network-2.8, ghc-megaparsec-7): New variables.
> (idris): Update to 1.3.2.
> [source]: Remove patch.
> [inputs]: Use ghc-network-2.8 and ghc-megaparsec-7.
> * gnu/packages/patches/idris-test-no-node.patch: Delete.
> * gnu/local.mk (dist_patch_DATA): Remove it.

[...]

> +++ b/gnu/packages/idris.scm
> @@ -30,15 +30,50 @@
>    #:use-module (gnu packages perl)
>    #:use-module (guix build-system gnu)
>    #:use-module (guix build-system haskell)
> +  #:use-module (guix utils)
>    #:use-module (guix download)
>    #:use-module (guix git-download)
>    #:use-module ((guix licenses) #:prefix license:)
>    #:use-module (guix packages))
>  
> +;;; Until we update our default GHC to >=8.6 we cannot update our ghc-network
> +;;; package, since the 'cabal-install' package that supports the current
> +;;; 'Cabal' module requires 'network==2.6.*'.  Providing a local ghc-network
> +;;; works in this case since we use it only for a standalone program.
> +(define ghc-network-2.8
> +  (package
> +    (inherit ghc-network)

You should only inherit from packages defined in the same module,
otherwise we risk hitting the dreaded circular dependency mess (actually
this particular case is fine because idris.scm is a “leaf”, but still,
let’s not take this risk.)

So I recommend moving these two ghc-* packages next to their friends.

With this change the patch LGTM.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#37435: [bug#37434] [PATCH 1/2] gnu: ghc-megaparsec: Update to 7.0.5.
  2019-09-24 17:08               ` Ludovic Courtès
@ 2019-09-25  2:20                 ` Eric Bavier
  0 siblings, 0 replies; 12+ messages in thread
From: Eric Bavier @ 2019-09-25  2:20 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 37434-done, 37435-done

----- On Sep 24, 2019, at 12:08 PM, Ludovic Courtès ludo@gnu.org wrote:

> Hi Eric,
> 
> Eric Bavier <ericbavier@centurylink.net> skribis:
> 
>> From 832529b71c2c5c7e6aa6e88a206c0db65e8a0c2e Mon Sep 17 00:00:00 2001
>> From: Eric Bavier <bavier@member.fsf.org>
>> Date: Mon, 16 Sep 2019 22:20:23 -0500
>> Subject: [PATCH] gnu: idris: Update to 1.3.2.
>>
>> * gnu/packages/idris.scm (ghc-network-2.8, ghc-megaparsec-7): New variables.
>> (idris): Update to 1.3.2.
>> [source]: Remove patch.
>> [inputs]: Use ghc-network-2.8 and ghc-megaparsec-7.
>> * gnu/packages/patches/idris-test-no-node.patch: Delete.
>> * gnu/local.mk (dist_patch_DATA): Remove it.
> 
> [...]
>> +;;; Until we update our default GHC to >=8.6 we cannot update our ghc-network
>> +;;; package, since the 'cabal-install' package that supports the current
>> +;;; 'Cabal' module requires 'network==2.6.*'.  Providing a local ghc-network
>> +;;; works in this case since we use it only for a standalone program.
>> +(define ghc-network-2.8
>> +  (package
>> +    (inherit ghc-network)
> 
> You should only inherit from packages defined in the same module,
> otherwise we risk hitting the dreaded circular dependency mess (actually
> this particular case is fine because idris.scm is a “leaf”, but still,
> let’s not take this risk.)
> 
> So I recommend moving these two ghc-* packages next to their friends.

Makes sense.  Done.

> With this change the patch LGTM.

Pushed with that change and other small adjustments for latest master in commit 4780db2c93.

-- 
`~Eric

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [bug#37434] [PATCH 1/2] gnu: ghc-megaparsec: Update to 7.0.5.
  2019-09-24 14:06             ` Eric Bavier
  2019-09-24 17:08               ` Ludovic Courtès
@ 2019-09-25 17:49               ` Timothy Sample
  1 sibling, 0 replies; 12+ messages in thread
From: Timothy Sample @ 2019-09-25 17:49 UTC (permalink / raw)
  To: Eric Bavier; +Cc: 37434, bavier

Hi Eric and Ludo,

Eric Bavier <ericbavier@centurylink.net> writes:

> ----- On Sep 24, 2019, at 2:16 AM, Ludovic Courtès ludo@gnu.org wrote:
>
>> For the sake of consistency, what about adding a variant of megaparsec
>> for use by Idris, and keeping the LTS-12 version?
>
> That sounds appropriate to me.  New patch attached.

Very good idea!  Thanks.

>>> I was under the impression that our 'guix refresh' updater was
>>> supposed to use
>>> the appropriate stackage version?  But it seems to be referencing
>>> version 14.6.
>> 
>> Looking at ‘latest-lts-release’ in (guix import stackage), the updater
>> seems to just take the latest LTS version.
>> 
>> We should probably fix that by having the argument to
>> ‘stackage-lts-info-fetch’ default to the currently targeted LTS version.
>> Otherwise one has to know the LTS version and pass it to ‘guix import
>> stackage --lts-version’, which is error-prone.
>> 
>> Thoughts?
>
> I think that would be the right thing to do, imo.

I believe we have a patch series from Robert that does this.  There were
a few things to fix up, but it is the right thing to do.

    https://bugs.gnu.org/36653

Unfortunately, I don’t do a lot of Haskell stuff for myself these days,
so my motivation here is pretty limited.  (There are only so many hours
in the week to tinker with Guix....)  Applying this patch and getting
the ball rolling on Stackage LTS 14 are on my to-do list, but I don’t
know when I’ll get around to them.  :(


-- Tim

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-09-25 17:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-17  3:37 [bug#37434] [PATCH 1/2] gnu: ghc-megaparsec: Update to 7.0.5 ericbavier
2019-09-17  3:37 ` [bug#37435] [PATCH 2/2] gnu: idris: Update to 1.3.2 ericbavier
2019-09-20 20:32 ` [bug#37434] [PATCH 1/2] gnu: ghc-megaparsec: Update to 7.0.5 Ludovic Courtès
2019-09-20 22:21   ` Timothy Sample
2019-09-20 22:25     ` Timothy Sample
2019-09-23  8:25       ` Ludovic Courtès
2019-09-24  1:59         ` Eric Bavier
2019-09-24  7:16           ` Ludovic Courtès
2019-09-24 14:06             ` Eric Bavier
2019-09-24 17:08               ` Ludovic Courtès
2019-09-25  2:20                 ` bug#37435: " Eric Bavier
2019-09-25 17:49               ` Timothy Sample

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).