LaurentRDC / pandoc-plot

Render and include figures in Pandoc documents using your plotting toolkit of choice
https://laurentrdc.github.io/pandoc-plot/
GNU General Public License v2.0
224 stars 8 forks source link

yaml-0.11.7.0 has a change which breaks newest version (1.3.0) on Hackage #32

Closed bcw closed 2 years ago

bcw commented 2 years ago

Using pandoc-plot-1.3.0, in the newest version (0.11.7.0) of yaml on Hackage, (.:?) now takes an Aeson.Key.Key instead of Text as second argument. This caused building a Hakyll site to fail for me; I am new to both Hakyll and your package, so there might be some other workaround I don't know of, but I had to add a dependency like yaml == 0.11.6.* to get it to compile.

It took me several hours to figure out what the problem was (at first I thought I needed a GHC pragma), so I hope it can be fixed to avoid that headache for others. Since you're using yaml >= 0.8 && < 1 right now, I think changing it to yaml >= 0.8 && < 0.11.7 should make your package keep working until someone finds a way to support the new way (like using some class Key and Text are both in, or something).

Anyway, thank you for your work on this project. Until I thought to search for something like this, I was building a simple site using a separate image compilation step with a Makefile and LaTeX, but I think this way will be much more convenient.

LaurentRDC commented 2 years ago

Thank you for your report. I have updated the Hackage bounds to prevent this problem with version 1.3.0 of pandoc-plot.

I'm adding support for aeson 2.x right now, which added the requirement for Key, for pandoc-plot version 1.4.0, which should make pandoc-plot work with yaml 0.11.7+.

bcw commented 2 years ago

Wow, that was fast. :smile: I guess this issue can be closed now.

LaurentRDC commented 2 years ago

pandoc-plot version 1.4.0 was just released on Hackage. It will work with aeson 2+ (and ONLY aeson v2+, for ease of maintenance).

The executables should be published on GitHub today.