[Git][haskell-team/DHG_packages][master] elm-compiler: Add patch to bump ansi-wl-pprint dependency; fix FTBFS (#1086264)

Hilko Bengen (@bengen) gitlab at salsa.debian.org
Fri Nov 29 19:13:04 GMT 2024



Hilko Bengen pushed to branch master at Debian Haskell Group / DHG_packages


Commits:
becbbe02 by Hilko Bengen at 2024-11-29T19:09:17+00:00
elm-compiler: Add patch to bump ansi-wl-pprint dependency; fix FTBFS (#1086264)

- - - - -


4 changed files:

- p/elm-compiler/debian/changelog
- p/elm-compiler/debian/control
- + p/elm-compiler/debian/patches/0002-bump-ansi-wl-pprint-dependency-fix-build.patch
- p/elm-compiler/debian/patches/series


Changes:

=====================================
p/elm-compiler/debian/changelog
=====================================
@@ -1,8 +1,13 @@
 elm-compiler (0.19.1-4) UNRELEASED; urgency=medium
 
+  [ Ilias Tsitsimpis ]
   * Declare compliance with Debian policy 4.7.0
 
- -- Ilias Tsitsimpis <iliastsi at debian.org>  Wed, 11 Sep 2024 15:16:54 +0300
+  [ Hilko Bengen ]
+  * Add patch to bump ansi-wl-pprint dependency; fix FTBFS
+    (Closes: #1086264)
+
+ -- Hilko Bengen <bengen at debian.org>  Fri, 29 Nov 2024 19:01:51 +0000
 
 elm-compiler (0.19.1-3) unstable; urgency=medium
 


=====================================
p/elm-compiler/debian/control
=====================================
@@ -14,8 +14,10 @@ Build-Depends: debhelper (>= 10),
  libghc-sha-prof,
  libghc-ansi-terminal-dev (>= 0.8),
  libghc-ansi-terminal-prof (>= 0.8),
- libghc-ansi-wl-pprint-dev (>= 0.6.8),
- libghc-ansi-wl-pprint-prof (>= 0.6.8),
+ libghc-ansi-wl-pprint-dev (>= 1),
+ libghc-ansi-wl-pprint-prof (>= 1),
+ libghc-prettyprinter-dev,
+ libghc-prettyprinter-prof,
  libghc-edit-distance-dev (>= 0.2),
  libghc-edit-distance-prof (>= 0.2),
  libghc-file-embed-dev,


=====================================
p/elm-compiler/debian/patches/0002-bump-ansi-wl-pprint-dependency-fix-build.patch
=====================================
@@ -0,0 +1,88 @@
+From: Hilko Bengen <bengen at debian.org>
+Date: Thu, 28 Nov 2024 01:24:16 +0000
+Subject: bump ansi-wl-pprint dependency, fix build
+
+ANSI support is still missing; until that is fixed, elm reactor won't
+output colored error messages.
+---
+ compiler/src/Reporting/Doc.hs | 21 +++++++++++++--------
+ elm.cabal                     |  4 +++-
+ 2 files changed, 16 insertions(+), 9 deletions(-)
+
+diff --git a/compiler/src/Reporting/Doc.hs b/compiler/src/Reporting/Doc.hs
+index 26c1551..99d1f49 100644
+--- a/compiler/src/Reporting/Doc.hs
++++ b/compiler/src/Reporting/Doc.hs
+@@ -48,10 +48,12 @@ import Prelude hiding (cycle)
+ import qualified Data.List as List
+ import Data.Monoid ((<>))
+ import qualified Data.Name as Name
++import qualified Data.Text as Text
+ import qualified System.Console.ANSI.Types as Ansi
+ import qualified System.Info as Info
+ import System.IO (Handle)
+ import qualified Text.PrettyPrint.ANSI.Leijen as P
++import qualified Prettyprinter as PP
+ 
+ import qualified Data.Index as Index
+ import qualified Elm.Package as Pkg
+@@ -309,26 +311,29 @@ data Color
+ toJsonHelp :: Style -> [String] -> P.SimpleDoc -> [E.Value]
+ toJsonHelp style revChunks simpleDoc =
+   case simpleDoc of
+-    P.SFail ->
++    PP.SFail ->
+       error $
+         "according to the main implementation, @SFail@ can not\
+         \ appear uncaught in a rendered @SimpleDoc@"
+ 
+-    P.SEmpty ->
++    PP.SEmpty ->
+       [ encodeChunks style revChunks ]
+ 
+-    P.SChar char rest ->
++    PP.SChar char rest ->
+       toJsonHelp style ([char] : revChunks) rest
+ 
+-    P.SText _ string rest ->
+-      toJsonHelp style (string : revChunks) rest
++    PP.SText _ text rest ->
++      toJsonHelp style (Text.unpack text : revChunks) rest
+ 
+-    P.SLine indent rest ->
++    PP.SLine indent rest ->
+       toJsonHelp style (replicate indent ' ' : "\n" : revChunks) rest
+ 
+-    P.SSGR sgrs rest ->
+-      encodeChunks style revChunks : toJsonHelp (sgrToStyle sgrs style) [] rest
++    -- FIXME need to figure out how to add ANSI SGR handling here
++    PP.SAnnPop rest ->
++      toJsonHelp style revChunks rest
+ 
++    PP.SAnnPush _ann rest ->
++      toJsonHelp style revChunks rest
+ 
+ sgrToStyle :: [Ansi.SGR] -> Style -> Style
+ sgrToStyle sgrs style@(Style bold underline color) =
+diff --git a/elm.cabal b/elm.cabal
+index 144fada..de91020 100644
+--- a/elm.cabal
++++ b/elm.cabal
+@@ -201,7 +201,8 @@ Executable elm
+ 
+     Build-depends:
+         ansi-terminal,
+-        ansi-wl-pprint < 1,
++        ansi-wl-pprint >= 1,
++        prettyprinter,
+         base,
+         binary,
+         bytestring,
+@@ -228,6 +229,7 @@ Executable elm
+         snap-core,
+         snap-server,
+         template-haskell,
++        text,
+         time,
+         unordered-containers,
+         utf8-string,


=====================================
p/elm-compiler/debian/patches/series
=====================================
@@ -1 +1,2 @@
 0001-update-to-build-with-GHC-9.4.patch
+0002-bump-ansi-wl-pprint-dependency-fix-build.patch



View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/commit/becbbe02e1827feaa72d1a8a49dfe7509427e61c

-- 
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/commit/becbbe02e1827feaa72d1a8a49dfe7509427e61c
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20241129/3c64d987/attachment-0001.htm>


More information about the Pkg-haskell-commits mailing list