diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-05-31 08:07:28 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-05-31 08:07:28 +0300 |
commit | 2bac6a7ba33fbc43c73a7ef77612d0fe27bc4418 (patch) | |
tree | 10e2fe08f0795bbf10665a789bfe5d92c12fc8bd /subplot.md | |
parent | 5a29cd95688a50808b25a4ec3b4fb3c3e68ff549 (diff) | |
download | subplot-2bac6a7ba33fbc43c73a7ef77612d0fe27bc4418.tar.gz |
feat! docgen always outputs a document
We have long had a feature for docgen that checks the time stamps of
all input files and the output file and avoids running Pandoc to
produce the output file, if the output file won't change. This has
always been a little imperfect: sometimes the output file would change
due to other changes than what's in the input files. For example, when
Pandoc changes, or when Subplot code changes. This has led to
surprised users. We no longer user Pandoc at all. Drop the time stamp
checking functionality and have docgen always write the output file.
Sponsored-by: author
Diffstat (limited to 'subplot.md')
-rw-r--r-- | subplot.md | 92 |
1 files changed, 0 insertions, 92 deletions
@@ -1976,98 +1976,6 @@ def is_set_to(ctx, name=None, value=None): -## Avoid changing typesetting output file needlessly - -### Avoid typesetting if output is newer than source files - -This scenario make sure that if docgen generates the bitwise identical -output to the existing output file, it doesn't actually write it to -the output file, including its timestamp. This avoids triggering -programs that monitor the output file for changes. - -~~~scenario -given file simple.subplot -given file simple.md -and file b.yaml -and file f.py -and an installed subplot -when I run subplot docgen simple.subplot -o simple.html -then file simple.html exists -when I remember metadata for file simple.html -and I wait until 1 second has passed -and I run subplot docgen simple.subplot -o simple.html -then file simple.html has same metadata as before -and only files simple.subplot, simple.md, b.yaml, f.py, simple.html exist -~~~ - -### Do typeset if output is older than subplot - -~~~scenario -given file simple.subplot -given file simple.md -and file b.yaml -and file f.py -and an installed subplot -when I run subplot docgen simple.subplot -o simple.html -then file simple.html exists -when I remember metadata for file simple.html -and I wait until 1 second has passed -and I touch file simple.subplot -and I run subplot docgen simple.subplot -o simple.html -then file simple.html has changed from before -~~~ - -### Do typeset if output is older than markdown - -~~~scenario -given file simple.subplot -given file simple.md -and file b.yaml -and file f.py -and an installed subplot -when I run subplot docgen simple.subplot -o simple.html -then file simple.html exists -when I remember metadata for file simple.html -and I wait until 1 second has passed -and I touch file simple.md -and I run subplot docgen simple.subplot -o simple.html -then file simple.html has changed from before -~~~ - -### Do typeset if output is older than functions - -~~~scenario -given file simple.subplot -given file simple.md -and file b.yaml -and file f.py -and an installed subplot -when I run subplot docgen simple.subplot -o simple.html -then file simple.html exists -when I remember metadata for file simple.html -and I wait until 1 second has passed -and I touch file f.py -and I run subplot docgen simple.subplot -o simple.html -then file simple.html has changed from before -~~~ - -### Do typeset if output is older than bindings - -~~~scenario -given file simple.subplot -given file simple.md -and file b.yaml -and file f.py -and an installed subplot -when I run subplot docgen simple.subplot -o simple.html -then file simple.html exists -when I remember metadata for file simple.html -and I wait until 1 second has passed -and I touch file b.yaml -and I run subplot docgen simple.subplot -o simple.html -then file simple.html has changed from before -~~~ - ## Document structure Subplot uses chapters and sections to keep together scenario snippets |