liamoc / latex-formulae

Libraries and tools for rendering math to images using real LaTeX, from Haskell, Pandoc and Hakyll

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bump dependency versions

edusporto opened this issue · comments

Hi, I'm trying to use latex-formulae-hakyll with GHC 9.2.8 on LTS 20.26, but I'm getting the following stack build errors:

Error: [S-4804]
       Stack failed to construct a build plan.

       While constructing the build plan, Stack encountered the following errors:

       In the dependencies for latex-formulae-hakyll-0.2.0.4:
           base-4.16.4.0 from Stack configuration does not match >=4.7 && <4.13 (latest matching version is 4.12.0.0)
           hakyll-4.15.1.1 from Stack configuration does not match >=4.6 && <4.14 (latest matching version is 4.13.4.1)
           pandoc-types-1.22.2.1 from Stack configuration does not match >=1.12 && <1.18 (latest matching version is 1.17.6.1)
       needed due to my-package-0.1.0.0 -> latex-formulae-hakyll-0.2.0.4

       In the dependencies for latex-formulae-image-0.1.1.4:
           base-4.16.4.0 from Stack configuration does not match >=4.8 && <4.14 (latest matching version is 4.13.0.0)
       needed due to my-package-0.1.0.0 -> latex-formulae-image-0.1.1.4

       In the dependencies for latex-formulae-pandoc-0.2.0.6:
           base64-bytestring-1.2.1.0 from Stack configuration does not match >=1.0 && <1.1 (latest matching version is 1.0.0.3)
           bytestring-0.11.4.0 from Stack configuration does not match >=0.10 && <0.11 (latest matching version is 0.10.12.1)
           pandoc-types-1.22.2.1 from Stack configuration does not match >=1.12 && <1.18 (latest matching version is 1.17.6.1)
       needed due to my-package-0.1.0.0 -> latex-formulae-pandoc-0.2.0.6

       Some different approaches to resolving this:

         * Set allow-newer: true in /home/edu/.stack/config.yaml to ignore all version constraints and build anyway.

         * Build requires unattainable version of the base package. Since base is a part of GHC, you most likely need to use a
           different GHC version with the matching base.

Unfortunately, the packages latex-formulae packages won't work out of the box with the new dependency versions. When trying to compile my project setting allow-newer: true, I got a few instances of an error that looks like this:

latex-formulae-pandoc> /tmp/stack-fb1a7e8d498e0991/latex-formulae-pandoc-0.2.0.6/src/Image/LaTeX/Render/Pandoc.hs:217:35: error:
latex-formulae-pandoc>     • Couldn't match type ‘[Char]’
latex-formulae-pandoc>                      with ‘text-1.2.5.0:Data.Text.Internal.Text’
latex-formulae-pandoc>       Expected: text-1.2.5.0:Data.Text.Internal.Text
latex-formulae-pandoc>         Actual: String
latex-formulae-pandoc>     • In the first argument of ‘Str’, namely ‘"Error:"’
latex-formulae-pandoc>       In the expression: Str "Error:"
latex-formulae-pandoc>       In the first argument of ‘Emph’, namely ‘[Str "Error:"]’
latex-formulae-pandoc>     |
latex-formulae-pandoc> 217 | pandocError = Strong . (Emph [Str "Error:"] :)
latex-formulae-pandoc>     |

It doesn't seem too hard to fix, I could try to do it if no one's available.

Thanks!