dev-haskell/call-stack: Patch (by hololeap) to fix tests

Signed-off-by: hololeap <hololeap@protonmail.com>
Signed-off-by: Mark Wright <gienah@gentoo.org>
This commit is contained in:
Mark Wright
2026-01-10 14:32:08 +11:00
parent bfc31fceee
commit bc7101e43a
3 changed files with 31 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -15,7 +15,6 @@ SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
IUSE=""
RDEPEND=">=dev-lang/ghc-8.4.3:=
"

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -15,6 +15,10 @@ LICENSE="MIT"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
PATCHES=(
"${FILESDIR}/${PN}-0.4.0-tests-ignore-srcLocPackage.patch"
)
RDEPEND=">=dev-lang/ghc-8.4.3:=
"
DEPEND="${RDEPEND}

View File

@@ -0,0 +1,25 @@
From 3df9eb420b742a1bbe5f7cb6202701663c057e6f Mon Sep 17 00:00:00 2001
From: hololeap <hololeap@protonmail.com>
Date: Wed, 29 Jan 2025 16:24:43 -0700
Subject: [PATCH 1/1] Reset srcLocPackage in test
The original returned value may include a ABI hash (when using newer
Cabal), which would be difficult to reliably test against. Reset it to
"main", which is expected by the test.
Signed-off-by: hololeap <hololeap@protonmail.com>
--- a/test/Data/CallStackSpec.hs
+++ b/test/Data/CallStackSpec.hs
@@ -9,7 +9,8 @@ spec :: Spec
spec = do
describe "callStack" $ do
it "returns the call stack" $ do
- mapLocations test `shouldBe` [
+ let test' = map (\(x,y) -> (x,y { srcLocPackage = "main" })) test
+ mapLocations test' `shouldBe` [
#if MIN_VERSION_base(4,8,1)
("bar"
, SrcLoc {
--
2.45.3