lierdakil / pandoc-crossref

Pandoc filter for cross-references
https://lierdakil.github.io/pandoc-crossref/
GNU General Public License v2.0
936 stars 74 forks source link

Incompatible API versions #365

Closed kurokirasama closed 1 year ago

kurokirasama commented 1 year ago

Hello, I just found this filter, I've been using pandoc for a few months now. I'm having this error:

WARNING: pandoc-crossref was compiled with pandoc 2.19.2 but is being run through 2.5. This is not supported. Strange things may (and likely will) happen silently.
pandoc-crossref: Error in $: Incompatible API versions: encoded with [1,17,5,4] but attempted to decode with [1,22,2,1].
CallStack (from HasCallStack):
  error, called at src/Text/Pandoc/JSON.hs:112:48 in pandoc-types-1.22.2.1-5mt0nvoRF4hAromalexUx:Text.Pandoc.JSON
Error running filter pandoc-crossref:
Filter returned error status 1

My pandoc version is:

pandoc 2.5
Compiled with pandoc-types 1.17.5.4, texmath 0.11.2.2, skylighting 0.7.7
Default user data directory: /home/kira/.pandoc
Copyright (C) 2006-2018 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

and my crossref version is:

pandoc-crossref v0.3.13.0 git commit e28fbed5294186e39db77f2e0a77f0cad3f2961e (master) built with Pandoc v2.19.2, pandoc-types v1.22.2.1 and GHC 9.0.2

Compiled from the repo with stack. I'm in Ubuntu 20.04.

lierdakil commented 1 year ago

Hi. Your pandoc version is very old, and pandoc-crossref keeps compatibility only with the latest one (and occasionally accidentally a few previous ones, but no guarantees), otherwise it's too much of a maintenance burden. The latest pandoc release is 2.19.2.

If you've built pandoc-crossref with stack, you actually also built pandoc, you just need to get the binary somewhere sensible. Go to the repo work tree and run stack install pandoc to get it into ~/.local/bin.

kurokirasama commented 1 year ago

working now, thanks!