mpark / wg21

Framework for Writing C++ Committee Papers
Boost Software License 1.0
125 stars 45 forks source link

Broken with Pandoc 2.10 #65

Closed mpark closed 3 years ago

mpark commented 4 years ago

The most recent release of Pandoc 2.10 complains with messages like this:

$ make TEST.html                                                                                                                                                       ❮❮❮
pandoc TEST.md -o generated/TEST.html -d ./data/defaults.yaml --toc-depth 2 \
    --bibliography ./data/index.yaml
Traceback (most recent call last):
  File "/Users/mcypark/Projects/wg21/data/filter/wg21.py", line 511, in <module>
    ], prepare, finalize)
  File "/Users/mcypark/Library/Python/3.7/lib/python/site-packages/panflute/io.py", line 233, in run_filters
    doc = load(input_stream=input_stream)
  File "/Users/mcypark/Library/Python/3.7/lib/python/site-packages/panflute/io.py", line 56, in load
    doc = json.load(input_stream, object_pairs_hook=from_json)
  File "/opt/homebrew/Cellar/python37/3.7.5_3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 296, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/opt/homebrew/Cellar/python37/3.7.5_3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 361, in loads
    return cls(**kw).decode(s)
  File "/opt/homebrew/Cellar/python37/3.7.5_3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/opt/homebrew/Cellar/python37/3.7.5_3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
  File "/Users/mcypark/Library/Python/3.7/lib/python/site-packages/panflute/elements.py", line 1478, in from_json
    raise Exception('unknown tag: ' + tag)
Exception: unknown tag: Caption

Thanks @cjdb for pointing me to it.

mpark commented 4 years ago

The issue seems to be that Pandoc 2.10 was released with some incompatible AST changes that Panflute doesn't know how to handle yet: https://github.com/sergiocorreia/panflute/issues/142 😞

aubertc commented 4 years ago

It's exactly the same issue as with a different filter, pandoc-numbering, https://github.com/chdemko/pandoc-numbering/issues/18

PeterSommerlad commented 3 years ago

Seems also broken with pandoc 2.11. Should use panflute 2.0, but I have no idea how to fix that (yet)

Unfortunately I ran brew upgrade and now have to chase all the incompatibilities of the pandoc upgrade with it.

Ideas?

mpark commented 3 years ago

We now keep a pinned local installation of Pandoc to avoid this issue starting 12843899212ec6a2e37a6c493c6cb32b62c61110. We'll upgrade to a newer version when we're ready, but for now we'll avoid people being on different, API-incompatible versions of Pandoc.