[metapost] results-caching bugs

Taco Hoekwater taco at elvenkind.com
Thu Oct 27 09:18:18 CEST 2011


Hi Doug,

On 10/26/2011 12:18 AM, Doug McIlroy wrote:
> If this is the wrong forum for reporting bugs, please
> point me in the right direction.  I didn't see how
> to do it at the metapost project home page.

This list is a fine place for bug reports.

> Bug 1.
> mpost apparently "optimizes" its behavior by doing nothing
> if it can find output lying around that seems to have
> come from the given input.  This caused me no end of
> confusion when I tried, on the same input, both mpost
> and mpost -T.  Unless one knows enough to remove the
> outputs between commands, one gets identical results from
> both.  By definition they are supposed to be different.

I've never seen this happen. What version of metapost are you using?
And if it is specific to a particular input and/or invocation, can
you post an example, please?

> Bug 2.
> After a failure, mpost leaves useless output lying
> around. This is bad form in general.  But it's
> doubly bad when it exacerbates Bug 1.  (Perhaps
> this has something to do with interactivity.  I
> naively respond "q" to the error prompt.)

Yes, you may get a partial output file. This happens with all the 
Knuthian programs, and is a very tricky thing to fix because the program 
does not always know whether a fatal error indeed invalidates the 
output. Also, the consensus in the (TeX) community is that partial 
output can be valuable during debugging, so it is better to leave it 
than remove it.

You could always test the return code of the executable for a succesful 
run in a script and delete the output if you do not trust it.

Best wishes,
Taco


More information about the metapost mailing list