[Git][haskell-team/DHG_packages][master] elm-compiler: Add upstreeam patch to fix FTBFS (Closes: #1054869)

Hilko Bengen (@bengen) gitlab at salsa.debian.org
Wed Nov 1 13:18:25 GMT 2023



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


Commits:
56ac271a by Hilko Bengen at 2023-11-01T14:18:01+01:00
elm-compiler: Add upstreeam patch to fix FTBFS (Closes: #1054869)

- - - - -


4 changed files:

- p/elm-compiler/debian/changelog
- − p/elm-compiler/debian/patches/0001-Remmove-upper-bounds-for-build-dependencies.patch
- + p/elm-compiler/debian/patches/0001-update-to-build-with-GHC-9.4.patch
- p/elm-compiler/debian/patches/series


Changes:

=====================================
p/elm-compiler/debian/changelog
=====================================
@@ -1,8 +1,12 @@
 elm-compiler (0.19.1-3) UNRELEASED; urgency=medium
 
+  [ Ilias Tsitsimpis ]
   * Declare compliance with Debian policy 4.6.2
 
- -- Ilias Tsitsimpis <iliastsi at debian.org>  Sun, 27 Aug 2023 12:33:22 +0300
+  [ Hilko Bengen ]
+  * Add upstreeam patch to fix FTBFS (Closes: #1054869)
+
+ -- Hilko Bengen <bengen at debian.org>  Wed, 01 Nov 2023 14:05:25 +0100
 
 elm-compiler (0.19.1-2) unstable; urgency=medium
 


=====================================
p/elm-compiler/debian/patches/0001-Remmove-upper-bounds-for-build-dependencies.patch deleted
=====================================
@@ -1,110 +0,0 @@
-From: Hilko Bengen <bengen at debian.org>
-Date: Thu, 22 Sep 2022 22:09:28 +0200
-Subject: Remmove upper bounds for build-dependencies
-
----
- elm.cabal        | 32 ++++++++++++++++----------------
- worker/elm.cabal | 30 +++++++++++++++---------------
- 2 files changed, 31 insertions(+), 31 deletions(-)
-
-diff --git a/elm.cabal b/elm.cabal
-index bf1cfcf..7f2c2d2 100644
---- a/elm.cabal
-+++ b/elm.cabal
-@@ -20,7 +20,7 @@ Copyright:  Copyright (c) 2011-present, Evan Czaplicki
- 
- Category: Compiler, Language
- 
--Cabal-version: >=1.9
-+Cabal-version: >= 1.9
- Build-type: Simple
- 
- source-repository head
-@@ -203,26 +203,26 @@ Executable elm
-         Paths_elm
- 
-     Build-depends:
--        ansi-terminal >= 0.8 && < 0.9,
--        ansi-wl-pprint >= 0.6.8 && < 0.7,
--        base >=4.11 && <5,
--        binary >= 0.8 && < 0.9,
--        bytestring >= 0.9 && < 0.11,
--        containers >= 0.5.8.2 && < 0.6,
--        directory >= 1.2.3.0 && < 2.0,
--        edit-distance >= 0.2 && < 0.3,
-+        ansi-terminal >= 0.8,
-+        ansi-wl-pprint >= 0.6.8,
-+        base >=4.11,
-+        binary >= 0.8,
-+        bytestring >= 0.9,
-+        containers >= 0.5.8.2,
-+        directory >= 1.2.3.0,
-+        edit-distance >= 0.2,
-         file-embed,
-         filelock,
--        filepath >= 1 && < 2.0,
-+        filepath >= 1,
-         ghc-prim >= 0.5.2,
-         haskeline,
--        HTTP >= 4000.2.5 && < 4000.4,
--        http-client >= 0.6 && < 0.7,
--        http-client-tls >= 0.3 && < 0.4,
--        http-types >= 0.12 && < 1.0,
-+        HTTP >= 4000.2.5,
-+        http-client >= 0.6,
-+        http-client-tls >= 0.3,
-+        http-types >= 0.12,
-         language-glsl >= 0.3,
--        mtl >= 2.2.1 && < 3,
--        network >= 2.4 && < 2.7,
-+        mtl >= 2.2.1,
-+        network >= 2.4,
-         parsec,
-         process,
-         raw-strings-qq,
-diff --git a/worker/elm.cabal b/worker/elm.cabal
-index 5a4a56b..4bc31b2 100644
---- a/worker/elm.cabal
-+++ b/worker/elm.cabal
-@@ -170,26 +170,26 @@ Executable worker
- 
-     Build-depends:
-         aeson,
--        ansi-terminal >= 0.8 && < 0.9,
--        ansi-wl-pprint >= 0.6.8 && < 0.7,
--        base >=4.11 && <5,
--        binary >= 0.8 && < 0.9,
--        bytestring >= 0.9 && < 0.11,
--        containers >= 0.5.8.2 && < 0.6,
--        directory >= 1.2.3.0 && < 2.0,
--        edit-distance >= 0.2 && < 0.3,
-+        ansi-terminal >= 0.8,
-+        ansi-wl-pprint >= 0.6.8,
-+        base >=4.11,
-+        binary >= 0.8,
-+        bytestring >= 0.9,
-+        containers >= 0.5.8.2,
-+        directory >= 1.2.3.0,
-+        edit-distance >= 0.2,
-         filelock,
--        filepath >= 1 && < 2.0,
-+        filepath >= 1,
-         ghc-prim >= 0.5.2,
-         haskeline,
--        HTTP >= 4000.2.5 && < 4000.4,
--        http-client >= 0.6 && < 0.7,
--        http-client-tls >= 0.3 && < 0.4,
--        http-types >= 0.12 && < 1.0,
-+        HTTP >= 4000.2.5,
-+        http-client >= 0.6,
-+        http-client-tls >= 0.3,
-+        http-types >= 0.12,
-         io-streams,
-         language-glsl >= 0.3,
--        mtl >= 2.2.1 && < 3,
--        network >= 2.4 && < 2.7,
-+        mtl >= 2.2.1,
-+        network >= 2.4,
-         network-uri,
-         parsec,
-         process,


=====================================
p/elm-compiler/debian/patches/0001-update-to-build-with-GHC-9.4.patch
=====================================
@@ -0,0 +1,226 @@
+From 0421dfbe48e53d880a401e201890eac0b3de5f06 Mon Sep 17 00:00:00 2001
+From: Evan Czaplicki <evancz at users.noreply.github.com>
+Date: Wed, 27 Sep 2023 16:55:35 +0200
+Subject: [PATCH] update to build with GHC 9.4.*
+
+---
+ compiler/src/Data/Name.hs      |  8 +++----
+ compiler/src/Data/Utf8.hs      | 28 ++++++++++++------------
+ compiler/src/Parse/Variable.hs |  4 ++--
+ elm.cabal                      | 39 ++++++++++++++++------------------
+ 4 files changed, 38 insertions(+), 41 deletions(-)
+
+Index: elm-compiler/compiler/src/Data/Name.hs
+===================================================================
+--- elm-compiler.orig/compiler/src/Data/Name.hs
++++ elm-compiler/compiler/src/Data/Name.hs
+@@ -241,7 +241,7 @@ fromTypeVariable name@(Utf8.Utf8 ba#) in
+   else
+     let
+       len# = sizeofByteArray# ba#
+-      end# = indexWord8Array# ba# (len# -# 1#)
++      end# = word8ToWord# (indexWord8Array# ba# (len# -# 1#))
+     in
+     if isTrue# (leWord# 0x30## end#) && isTrue# (leWord# end# 0x39##) then
+       runST
+@@ -316,11 +316,11 @@ fromManyNames names =
+         ST $ \s ->
+           case newByteArray# (len# +# 3#) s of
+             (# s, mba# #) ->
+-              case writeWord8Array# mba# 0# 0x5F## {-_-} s of
++              case writeWord8Array# mba# 0# (wordToWord8# 0x5F##) {-_-} s of
+                 s ->
+-                  case writeWord8Array# mba# 1# 0x4D## {-M-} s of
++                  case writeWord8Array# mba# 1# (wordToWord8# 0x4D##) {-M-} s of
+                     s ->
+-                      case writeWord8Array# mba# 2# 0x24## {-$-} s of
++                      case writeWord8Array# mba# 2# (wordToWord8# 0x24##) {-$-} s of
+                         s ->
+                           case copyByteArray# ba# 0# mba# 3# len# s of
+                             s ->
+Index: elm-compiler/compiler/src/Data/Utf8.hs
+===================================================================
+--- elm-compiler.orig/compiler/src/Data/Utf8.hs
++++ elm-compiler/compiler/src/Data/Utf8.hs
+@@ -109,10 +109,10 @@ contains (W8# word#) (Utf8 ba#) =
+   containsHelp word# ba# 0# (sizeofByteArray# ba#)
+ 
+ 
+-containsHelp :: Word# -> ByteArray# -> Int# -> Int# -> Bool
++containsHelp :: Word8# -> ByteArray# -> Int# -> Int# -> Bool
+ containsHelp word# ba# !offset# len# =
+   if isTrue# (offset# <# len#) then
+-    if isTrue# (eqWord# word# (indexWord8Array# ba# offset#))
++    if isTrue# (eqWord8# word# (indexWord8Array# ba# offset#))
+       then True
+       else containsHelp word# ba# (offset# +# 1#) len#
+   else
+@@ -145,7 +145,7 @@ startsWithChar isGood bytes@(Utf8 ba#) =
+     False
+   else
+     let
+-      !w# = indexWord8Array# ba# 0#
++      !w# = word8ToWord# (indexWord8Array# ba# 0#)
+       !char
+         | isTrue# (ltWord# w# 0xC0##) = C# (chr# (word2Int# w#))
+         | isTrue# (ltWord# w# 0xE0##) = chr2 ba# 0# w#
+@@ -164,7 +164,7 @@ endsWithWord8 (W8# w#) (Utf8 ba#) =
+   let len# = sizeofByteArray# ba# in
+   isTrue# (len# ># 0#)
+   &&
+-  isTrue# (eqWord# w# (indexWord8Array# ba# (len# -# 1#)))
++  isTrue# (eqWord8# w# (indexWord8Array# ba# (len# -# 1#)))
+ 
+ 
+ 
+@@ -186,11 +186,11 @@ splitHelp str start offsets =
+       unsafeSlice str start offset : splitHelp str (offset + 1) offsets
+ 
+ 
+-findDividers :: Word# -> ByteArray# -> Int# -> Int# -> [Int] -> [Int]
++findDividers :: Word8# -> ByteArray# -> Int# -> Int# -> [Int] -> [Int]
+ findDividers divider# ba# !offset# len# revOffsets =
+   if isTrue# (offset# <# len#) then
+     findDividers divider# ba# (offset# +# 1#) len# $
+-      if isTrue# (eqWord# divider# (indexWord8Array# ba# offset#))
++      if isTrue# (eqWord8# divider# (indexWord8Array# ba# offset#))
+       then I# offset# : revOffsets
+       else revOffsets
+   else
+@@ -351,7 +351,7 @@ toCharsHelp ba# offset# len# =
+     []
+   else
+     let
+-      !w# = indexWord8Array# ba# offset#
++      !w# = word8ToWord# (indexWord8Array# ba# offset#)
+       !(# char, width# #)
+         | isTrue# (ltWord# w# 0xC0##) = (# C# (chr# (word2Int# w#)), 1# #)
+         | isTrue# (ltWord# w# 0xE0##) = (# chr2 ba# offset# w#, 2# #)
+@@ -368,7 +368,7 @@ chr2 :: ByteArray# -> Int# -> Word# -> C
+ chr2 ba# offset# firstWord# =
+   let
+     !i1# = word2Int# firstWord#
+-    !i2# = word2Int# (indexWord8Array# ba# (offset# +# 1#))
++    !i2# = word2Int# (word8ToWord# (indexWord8Array# ba# (offset# +# 1#)))
+     !c1# = uncheckedIShiftL# (i1# -# 0xC0#) 6#
+     !c2# = i2# -# 0x80#
+   in
+@@ -380,8 +380,8 @@ chr3 :: ByteArray# -> Int# -> Word# -> C
+ chr3 ba# offset# firstWord# =
+   let
+     !i1# = word2Int# firstWord#
+-    !i2# = word2Int# (indexWord8Array# ba# (offset# +# 1#))
+-    !i3# = word2Int# (indexWord8Array# ba# (offset# +# 2#))
++    !i2# = word2Int# (word8ToWord# (indexWord8Array# ba# (offset# +# 1#)))
++    !i3# = word2Int# (word8ToWord# (indexWord8Array# ba# (offset# +# 2#)))
+     !c1# = uncheckedIShiftL# (i1# -# 0xE0#) 12#
+     !c2# = uncheckedIShiftL# (i2# -# 0x80#) 6#
+     !c3# = i3# -# 0x80#
+@@ -394,9 +394,9 @@ chr4 :: ByteArray# -> Int# -> Word# -> C
+ chr4 ba# offset# firstWord# =
+   let
+     !i1# = word2Int# firstWord#
+-    !i2# = word2Int# (indexWord8Array# ba# (offset# +# 1#))
+-    !i3# = word2Int# (indexWord8Array# ba# (offset# +# 2#))
+-    !i4# = word2Int# (indexWord8Array# ba# (offset# +# 3#))
++    !i2# = word2Int# (word8ToWord# (indexWord8Array# ba# (offset# +# 1#)))
++    !i3# = word2Int# (word8ToWord# (indexWord8Array# ba# (offset# +# 2#)))
++    !i4# = word2Int# (word8ToWord# (indexWord8Array# ba# (offset# +# 3#)))
+     !c1# = uncheckedIShiftL# (i1# -# 0xF0#) 18#
+     !c2# = uncheckedIShiftL# (i2# -# 0x80#) 12#
+     !c3# = uncheckedIShiftL# (i3# -# 0x80#) 6#
+@@ -471,7 +471,7 @@ toEscapedBuilderHelp before after !name@
+ escape :: Word8 -> Word8 -> Ptr a -> Utf8 t -> Int -> Int -> Int -> IO ()
+ escape before@(W8# before#) after ptr name@(Utf8 ba#) offset@(I# offset#) len@(I# len#) i@(I# i#) =
+   if isTrue# (i# <# len#) then
+-    if isTrue# (eqWord# before# (indexWord8Array# ba# (offset# +# i#)))
++    if isTrue# (eqWord8# before# (indexWord8Array# ba# (offset# +# i#)))
+     then
+       do  writeWordToPtr ptr i after
+           escape before after ptr name offset len (i + 1)
+Index: elm-compiler/compiler/src/Parse/Variable.hs
+===================================================================
+--- elm-compiler.orig/compiler/src/Parse/Variable.hs
++++ elm-compiler/compiler/src/Parse/Variable.hs
+@@ -21,7 +21,7 @@ import qualified Data.Name as Name
+ import qualified Data.Set as Set
+ import Data.Word (Word8)
+ import Foreign.Ptr (Ptr, plusPtr)
+-import GHC.Exts (Char(C#), Int#, (+#), (-#), chr#, uncheckedIShiftL#, word2Int#)
++import GHC.Exts (Char(C#), Int#, (+#), (-#), chr#, uncheckedIShiftL#, word2Int#, word8ToWord#)
+ import GHC.Word (Word8(W8#))
+ 
+ import qualified AST.Source as Src
+@@ -384,4 +384,4 @@ chr4 pos firstWord =
+ 
+ unpack :: Word8 -> Int#
+ unpack (W8# word#) =
+-  word2Int# word#
++  word2Int# (word8ToWord# word#)
+Index: elm-compiler/elm.cabal
+===================================================================
+--- elm-compiler.orig/elm.cabal
++++ elm-compiler/elm.cabal
+@@ -35,9 +35,6 @@ Flag dev {
+ 
+ 
+ Executable elm
+-    if flag(dev)
+-        ghc-options: -O0 -Wall -Werror
+-    else
+         ghc-options: -O2 -rtsopts -threaded "-with-rtsopts=-N -qg -A128m"
+         -- add -eventlog for (elm make src/Main.elm +RTS -l; threadscope elm.eventlog)
+         -- https://www.oreilly.com/library/view/parallel-and-concurrent/9781449335939/
+@@ -203,26 +200,26 @@ Executable elm
+         Paths_elm
+ 
+     Build-depends:
+-        ansi-terminal >= 0.8 && < 0.9,
+-        ansi-wl-pprint >= 0.6.8 && < 0.7,
+-        base >=4.11 && <5,
+-        binary >= 0.8 && < 0.9,
+-        bytestring >= 0.9 && < 0.11,
+-        containers >= 0.5.8.2 && < 0.6,
+-        directory >= 1.2.3.0 && < 2.0,
+-        edit-distance >= 0.2 && < 0.3,
++        ansi-terminal,
++        ansi-wl-pprint < 1,
++        base,
++        binary,
++        bytestring,
++        containers,
++        directory,
++        edit-distance,
+         file-embed,
+         filelock,
+-        filepath >= 1 && < 2.0,
+-        ghc-prim >= 0.5.2,
++        filepath,
++        ghc-prim,
+         haskeline,
+-        HTTP >= 4000.2.5 && < 4000.4,
+-        http-client >= 0.6 && < 0.7,
+-        http-client-tls >= 0.3 && < 0.4,
+-        http-types >= 0.12 && < 1.0,
+-        language-glsl >= 0.3,
+-        mtl >= 2.2.1 && < 3,
+-        network >= 2.4 && < 2.7,
++        HTTP,
++        http-client,
++        http-client-tls,
++        http-types,
++        language-glsl,
++        mtl,
++        network,
+         parsec,
+         process,
+         raw-strings-qq,
+@@ -231,7 +228,7 @@ Executable elm
+         snap-core,
+         snap-server,
+         template-haskell,
+-        time >= 1.9.1,
++        time,
+         unordered-containers,
+         utf8-string,
+         vector,


=====================================
p/elm-compiler/debian/patches/series
=====================================
@@ -1 +1 @@
-0001-Remmove-upper-bounds-for-build-dependencies.patch
+0001-update-to-build-with-GHC-9.4.patch



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

-- 
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/commit/56ac271a461b3eae45c13a510495313612c9a29b
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/20231101/77a5338c/attachment-0001.htm>


More information about the Pkg-haskell-commits mailing list