mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
gnu: ghc-hpack: Update to 0.31.2.
* gnu/packages/haskell-xyz.scm (ghc-hpack): Update to 0.31.2. [source]: Use a patch to fix tests. [inputs]: Add 'ghc-infer-license'. * gnu/packages/patches/ghc-hpack-fix-tests.patch: New file. * gnu/local.mk: Add it.
This commit is contained in:
parent
1f656b17d9
commit
06344a3a39
3 changed files with 198 additions and 2 deletions
|
@ -881,6 +881,7 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/ghc-diff-swap-cover-args.patch \
|
||||
%D%/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch \
|
||||
%D%/packages/patches/ghc-haddock-library-unbundle.patch \
|
||||
%D%/packages/patches/ghc-hpack-fix-tests.patch \
|
||||
%D%/packages/patches/ghc-monad-par-fix-tests.patch \
|
||||
%D%/packages/patches/ghostscript-no-header-id.patch \
|
||||
%D%/packages/patches/ghostscript-no-header-uuid.patch \
|
||||
|
|
|
@ -4953,15 +4953,16 @@ (define-public ghc-hourglass
|
|||
(define-public ghc-hpack
|
||||
(package
|
||||
(name "ghc-hpack")
|
||||
(version "0.28.2")
|
||||
(version "0.31.2")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "https://hackage.haskell.org/package/hpack/"
|
||||
"hpack-" version ".tar.gz"))
|
||||
(patches (search-patches "ghc-hpack-fix-tests.patch"))
|
||||
(sha256
|
||||
(base32
|
||||
"18w0h76jdp3mk9vin8da9iz3cwhcxmw787xy8wlh8bxcpcr16q5r"))))
|
||||
"1l2d6185lawwhsj70swxkvcacm0hvcn9qsrlx4ph4gs6k578603g"))))
|
||||
(build-system haskell-build-system)
|
||||
(inputs
|
||||
`(("ghc-aeson" ,ghc-aeson)
|
||||
|
@ -4971,6 +4972,7 @@ (define-public ghc-hpack
|
|||
("ghc-http-client" ,ghc-http-client)
|
||||
("ghc-http-client-tls" ,ghc-http-client-tls)
|
||||
("ghc-http-types" ,ghc-http-types)
|
||||
("ghc-infer-license" ,ghc-infer-license)
|
||||
("ghc-scientific" ,ghc-scientific)
|
||||
("ghc-unordered-containers" ,ghc-unordered-containers)
|
||||
("ghc-vector" ,ghc-vector)
|
||||
|
|
193
gnu/packages/patches/ghc-hpack-fix-tests.patch
Normal file
193
gnu/packages/patches/ghc-hpack-fix-tests.patch
Normal file
|
@ -0,0 +1,193 @@
|
|||
This patch is taken and adapted from upstream. It landed shortly after
|
||||
the release of 0.31.2, and fixes eleven tests. The patch has been
|
||||
lightly adapted to apply to the release tarball, but the commit message
|
||||
was left untouched, so it refers to some changes not included in the
|
||||
patch.
|
||||
|
||||
From a8d9362d4b686074f698c04c20beea88587511a1 Mon Sep 17 00:00:00 2001
|
||||
From: quasicomputational <quasicomputational@gmail.com>
|
||||
Date: Sat, 1 Jun 2019 15:11:31 +0100
|
||||
Subject: [PATCH] Make CI green (#345)
|
||||
|
||||
* AppVeyor workaround for TMP issue
|
||||
|
||||
https://github.com/commercialhaskell/stack/issues/3944
|
||||
|
||||
* Bump resolver to nightly-2018-12-12.
|
||||
|
||||
This has the primary benefit of moving to GHC 8.6.3 and should fix
|
||||
AppVeyor.
|
||||
|
||||
* Add clock 0.8 as an extra-dep.
|
||||
|
||||
* Adapt expected output to aeson 1.4.3.0.
|
||||
---
|
||||
appveyor.yml | 3 +++
|
||||
hpack.cabal | 10 +++++-----
|
||||
package.yaml | 2 +-
|
||||
stack.yaml | 5 +++--
|
||||
test/Data/Aeson/Config/FromValueSpec.hs | 2 +-
|
||||
test/Data/Aeson/Config/TypesSpec.hs | 2 +-
|
||||
test/EndToEndSpec.hs | 8 ++++----
|
||||
test/Hpack/ConfigSpec.hs | 2 +-
|
||||
test/Hpack/Syntax/DefaultsSpec.hs | 2 +-
|
||||
test/Hpack/Syntax/DependenciesSpec.hs | 4 ++--
|
||||
10 files changed, 22 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/hpack.cabal b/hpack.cabal
|
||||
index fedb9a8..4db3014 100644
|
||||
--- a/hpack.cabal
|
||||
+++ b/hpack.cabal
|
||||
@@ -1,10 +1,10 @@
|
||||
cabal-version: 1.12
|
||||
|
||||
--- This file has been generated from package.yaml by hpack version 0.31.0.
|
||||
+-- This file has been generated from package.yaml by hpack version 0.31.2.
|
||||
--
|
||||
-- see: https://github.com/sol/hpack
|
||||
--
|
||||
--- hash: 3d060180293c32b8d0c25b710d0f419e96a6cc6ec3f95ac5e70bb77f44cbafc3
|
||||
+-- hash: bd5dd178c7e9f7f7a3456d79b592ea336c41ef43c9892354c001f06659e8b901
|
||||
|
||||
name: hpack
|
||||
version: 0.31.2
|
||||
@@ -31,7 +31,7 @@ library
|
||||
build-depends:
|
||||
Cabal >=2.2
|
||||
, Glob >=0.9.0
|
||||
- , aeson >=1.2.1.0
|
||||
+ , aeson >=1.4.3.0
|
||||
, base >=4.9 && <5
|
||||
, bifunctors
|
||||
, bytestring
|
||||
@@ -87,7 +87,7 @@ executable hpack
|
||||
build-depends:
|
||||
Cabal >=2.2
|
||||
, Glob >=0.9.0
|
||||
- , aeson >=1.2.1.0
|
||||
+ , aeson >=1.4.3.0
|
||||
, base >=4.9 && <5
|
||||
, bifunctors
|
||||
, bytestring
|
||||
@@ -125,7 +125,7 @@ test-suite spec
|
||||
, Glob >=0.9.0
|
||||
, HUnit >=1.6.0.0
|
||||
, QuickCheck
|
||||
- , aeson >=1.2.1.0
|
||||
+ , aeson >=1.4.3.0
|
||||
, base >=4.9 && <5
|
||||
, bifunctors
|
||||
, bytestring
|
||||
diff --git a/test/Data/Aeson/Config/FromValueSpec.hs b/test/Data/Aeson/Config/FromValueSpec.hs
|
||||
index 33de8b7..06b3eb9 100644
|
||||
--- a/test/Data/Aeson/Config/FromValueSpec.hs
|
||||
+++ b/test/Data/Aeson/Config/FromValueSpec.hs
|
||||
@@ -85,7 +85,7 @@ spec = do
|
||||
[yaml|
|
||||
name: "Joe"
|
||||
age: "23"
|
||||
- |] `shouldDecodeTo` left "Error while parsing $.age - expected Int, encountered String"
|
||||
+ |] `shouldDecodeTo` left "Error while parsing $.age - parsing Int failed, expected Number, but encountered String"
|
||||
|
||||
context "with (,)" $ do
|
||||
it "captures unrecognized fields" $ do
|
||||
diff --git a/test/Data/Aeson/Config/TypesSpec.hs b/test/Data/Aeson/Config/TypesSpec.hs
|
||||
index c954534..472aa42 100644
|
||||
--- a/test/Data/Aeson/Config/TypesSpec.hs
|
||||
+++ b/test/Data/Aeson/Config/TypesSpec.hs
|
||||
@@ -13,7 +13,7 @@ spec = do
|
||||
context "List" $ do
|
||||
let
|
||||
parseError :: String -> Result (List Int)
|
||||
- parseError prefix = Left (prefix ++ " - expected Int, encountered String")
|
||||
+ parseError prefix = Left (prefix ++ " - parsing Int failed, expected Number, but encountered String")
|
||||
|
||||
context "when parsing single values" $ do
|
||||
it "returns the value in a singleton list" $ do
|
||||
diff --git a/test/EndToEndSpec.hs b/test/EndToEndSpec.hs
|
||||
index 283c72c..46389ea 100644
|
||||
--- a/test/EndToEndSpec.hs
|
||||
+++ b/test/EndToEndSpec.hs
|
||||
@@ -285,7 +285,7 @@ spec = around_ (inTempDirectoryNamed "foo") $ do
|
||||
path: defaults.yaml
|
||||
ref: "2017"
|
||||
library: {}
|
||||
- |] `shouldFailWith` (file ++ ": Error while parsing $ - expected Object, encountered Array")
|
||||
+ |] `shouldFailWith` (file ++ ": Error while parsing $ - expected Object, but encountered Array")
|
||||
|
||||
it "warns on unknown fields" $ do
|
||||
let file = joinPath ["defaults", "sol", "hpack-template", "2017", "defaults.yaml"]
|
||||
@@ -340,7 +340,7 @@ spec = around_ (inTempDirectoryNamed "foo") $ do
|
||||
it "rejects other values" $ do
|
||||
[i|
|
||||
version: {}
|
||||
- |] `shouldFailWith` "package.yaml: Error while parsing $.version - expected Number or String, encountered Object"
|
||||
+ |] `shouldFailWith` "package.yaml: Error while parsing $.version - expected Number or String, but encountered Object"
|
||||
|
||||
describe "license" $ do
|
||||
it "accepts cabal-style licenses" $ do
|
||||
@@ -1363,14 +1363,14 @@ spec = around_ (inTempDirectoryNamed "foo") $ do
|
||||
then:
|
||||
dependencies: Win32
|
||||
else: null
|
||||
- |] `shouldFailWith` "package.yaml: Error while parsing $.when.else - expected Object, encountered Null"
|
||||
+ |] `shouldFailWith` "package.yaml: Error while parsing $.when.else - expected Object, but encountered Null"
|
||||
|
||||
it "rejects invalid conditionals" $ do
|
||||
[i|
|
||||
dependencies:
|
||||
- foo
|
||||
- 23
|
||||
- |] `shouldFailWith` "package.yaml: Error while parsing $.dependencies[1] - expected Object or String, encountered Number"
|
||||
+ |] `shouldFailWith` "package.yaml: Error while parsing $.dependencies[1] - expected Object or String, but encountered Number"
|
||||
|
||||
it "warns on unknown fields" $ do
|
||||
[i|
|
||||
diff --git a/test/Hpack/ConfigSpec.hs b/test/Hpack/ConfigSpec.hs
|
||||
index 9f4b279..69cbea1 100644
|
||||
--- a/test/Hpack/ConfigSpec.hs
|
||||
+++ b/test/Hpack/ConfigSpec.hs
|
||||
@@ -675,7 +675,7 @@ spec = do
|
||||
it "rejects other values" $ do
|
||||
[yaml|
|
||||
23
|
||||
- |] `shouldDecodeTo` (Left "Error while parsing $ - expected Boolean or String, encountered Number" :: Result Cond)
|
||||
+ |] `shouldDecodeTo` (Left "Error while parsing $ - expected Boolean or String, but encountered Number" :: Result Cond)
|
||||
|
||||
describe "formatOrList" $ do
|
||||
it "formats a singleton list" $ do
|
||||
diff --git a/test/Hpack/Syntax/DefaultsSpec.hs b/test/Hpack/Syntax/DefaultsSpec.hs
|
||||
index 5875413..5438b7a 100644
|
||||
--- a/test/Hpack/Syntax/DefaultsSpec.hs
|
||||
+++ b/test/Hpack/Syntax/DefaultsSpec.hs
|
||||
@@ -151,4 +151,4 @@ spec = do
|
||||
it "fails" $ do
|
||||
[yaml|
|
||||
10
|
||||
- |] `shouldDecodeTo` left "Error while parsing $ - expected Object or String, encountered Number"
|
||||
+ |] `shouldDecodeTo` left "Error while parsing $ - expected Object or String, but encountered Number"
|
||||
diff --git a/test/Hpack/Syntax/DependenciesSpec.hs b/test/Hpack/Syntax/DependenciesSpec.hs
|
||||
index 1a83732..d95044f 100644
|
||||
--- a/test/Hpack/Syntax/DependenciesSpec.hs
|
||||
+++ b/test/Hpack/Syntax/DependenciesSpec.hs
|
||||
@@ -125,7 +125,7 @@ spec = do
|
||||
it "rejects invalid values" $ do
|
||||
[yaml|
|
||||
hpack: []
|
||||
- |] `shouldDecodeTo` left "Error while parsing $.hpack - expected Null, Object, Number, or String, encountered Array"
|
||||
+ |] `shouldDecodeTo` left "Error while parsing $.hpack - expected Null, Object, Number, or String, but encountered Array"
|
||||
|
||||
context "when the constraint is a Number" $ do
|
||||
it "accepts 1" $ do
|
||||
@@ -213,7 +213,7 @@ spec = do
|
||||
[yaml|
|
||||
foo:
|
||||
version: {}
|
||||
- |] `shouldDecodeTo` left "Error while parsing $.foo.version - expected Null, Number, or String, encountered Object"
|
||||
+ |] `shouldDecodeTo` left "Error while parsing $.foo.version - expected Null, Number, or String, but encountered Object"
|
||||
|
||||
it "accepts a string" $ do
|
||||
[yaml|
|
||||
--
|
||||
2.23.0
|
||||
|
Loading…
Reference in a new issue