From e91244d2ecba0ea38c9a909e39d316bdc4dbda13 Mon Sep 17 00:00:00 2001 From: "Wolfgang E. Sanyer" Date: Fri, 8 Jan 2021 00:06:42 -0500 Subject: [PATCH] dev-haskell/fay: bump to 0.24.1.0-r1, loosen aeson bounds. Upstream issue[1] has been opened to relax the same bounds. Also, the test package has been added, though it has to be restricted due to a circular depenedency. Check the comments in the ebuild for a one-off workaround if you want to run the tests. [1]: https://github.com/faylang/fay/issues/469 Signed-off-by: Wolfgang E. Sanyer --- ...0.24.1.0.ebuild => fay-0.24.1.0-r1.ebuild} | 50 ++++++++++++++++--- dev-haskell/fay/metadata.xml | 49 +++--------------- 2 files changed, 51 insertions(+), 48 deletions(-) rename dev-haskell/fay/{fay-0.24.1.0.ebuild => fay-0.24.1.0-r1.ebuild} (58%) diff --git a/dev-haskell/fay/fay-0.24.1.0.ebuild b/dev-haskell/fay/fay-0.24.1.0-r1.ebuild similarity index 58% rename from dev-haskell/fay/fay-0.24.1.0.ebuild rename to dev-haskell/fay/fay-0.24.1.0-r1.ebuild index 6eaed4f840a..7a5a6facf3a 100644 --- a/dev-haskell/fay/fay-0.24.1.0.ebuild +++ b/dev-haskell/fay/fay-0.24.1.0-r1.ebuild @@ -1,10 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -# ebuild generated by hackport 0.6.4.9999 -#hackport: flags: -test +# ebuild generated by hackport 0.6.7.9999 CABAL_FEATURES="lib profile haddock hoogle hscolour" inherit haskell-cabal @@ -16,10 +15,23 @@ SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz" LICENSE="BSD" SLOT="0/${PV}" KEYWORDS="~amd64 ~x86" -IUSE="" +IUSE="test" +# There is a circular dependency with USE=test: fay → fay-base → fay. you would +# think you could resolve this by first `USE=-test emerge -1 fay fay-base`, and +# you would be right, but due to how ghc works, and since your configuration +# flags change when USE=test, we get a broken ghc-pkg thing whenever we flip +# USE=test back no for fay. +# +# As a temporary workaround, and to actually run the tests, the following can be +# done: +# +# 1. delete the dev-haskell/fay-base dependency from this ebuild +# 2. `USE=test emerge -1 fay fay-base` +# 3. `USE=test ebuild fay-0.24.1.0-r1.ebuild test` +RESTRICT="test" -RDEPEND=">dev-haskell/aeson-0.6:=[profile?] =dev-haskell/base-compat-0.10:=[profile?] dev-haskell/aeson-0.6:=[profile?] 0.6 && < 1.5' 'aeson > 0.6' \ + 'base-compat >= 0.10 && < 0.11' 'base-compat >= 0.10' \ + 'tasty >= 0.9 && < 1.2' 'tasty >= 0.9' +} + src_configure() { haskell-cabal_src_configure \ - --flag=-test + $(cabal_flag test) +} + +src_test() { + local test_loc="${S}/dist/build/fay-tests" + local test_cmd="fay-tests --num-threads=$(nproc) -random 20" + echo "${test_cmd}" || die + eval "${test_loc}/${test_cmd}" || die } diff --git a/dev-haskell/fay/metadata.xml b/dev-haskell/fay/metadata.xml index dc72657b802..4a17da34a07 100644 --- a/dev-haskell/fay/metadata.xml +++ b/dev-haskell/fay/metadata.xml @@ -5,54 +5,21 @@ haskell@gentoo.org Gentoo Haskell + + Build the fay-tests executable + - Fay is a proper subset of Haskell which can be compiled (type-checked) - with GHC, and compiled to JavaScript. It is lazy, pure, with a Fay monad, - an FFI, tail-recursion optimization (experimental). It implements no type - system, for type-checking you should use GHC. + Fay is a proper subset of Haskell which is type-checked + with GHC, and compiled to JavaScript. It is lazy, pure, has a Fay monad, + an FFI, tail-recursion optimization (experimental), and support for cabal packages. /Documentation/ - See documentation at <http://fay-lang.org/> or build your own documentation with: - - > $ cabal unpack fay - > $ cd fay-* - > $ cabal install - > $ dist/build/fay-docs/fay-docs - + See <https://github.com/faylang/fay/wiki> /Examples/ - See <http://fay-lang.org/#examples>. - - /Release Notes/ - - * Enable strict list for arithmetic sequences optimisation only when compiler optimise flag set. - - * Add print and putStrLn to the Prelude - - * Add list utility functions from the standard Prelude - - * Test optimized as well as unoptimized builds. - - * Standard precendence and associativity for infix operators - - * Add function utilities from Prelude, including seq - - * Add math functions in Prelude - - * Add support for sections (desugaring to lambdas) - - * Added example of the ContT and Deferred monad, sleep and readFile. - - * Add more of the prelude, including error and a lot of math stuff. - - * Remove needs for module declarations in modules that define main. - - * Support enumThen ([1,2..]) style lists. - - * Add support for enumFromThenTo ([1,2..10]) lists. + See the examples directory and <https://github.com/faylang/fay/wiki#fay-in-the-wild> - See full history at: <https://github.com/faylang/fay/commits>