cpitclaudel / alectryon

A collection of tools for writing technical documents that mix Coq code and prose.
MIT License
228 stars 36 forks source link

`.json` cache files are empty #3

Closed jhaag closed 4 years ago

jhaag commented 4 years ago

After setting alectryon.docutils.CACHE_DIRECTORY, every single one of my .rst files generate a .rst.cache file as it should. Unfortunately, the contents of each file - regardless of what .. coq:: code it contains - are the same "empty" .json:

{
  "metadata": {
    "serapi_args": [
      "-Q",
      "/home/jhaag/dev/bedrock/fm-docs/src,"
    ]
  },
  "chunks": [],
  "annotated": []
}
cpitclaudel commented 4 years ago

Thanks for the report! Fixed in e400dd31739a7495edfc764c3836817fb6f7f0d3, and I added a test recipe to catch this case. In Sphinx the post-processor was added twice, and the second run overwrote the cache (with an empty list, since it didn't find any blocks to process, because they had all already been processed)