Dear all,

Several bugs have occurred because of LyX not deleting certain temporary
files before recompiling. For example:
http://www.lyx.org/trac/ticket/9963
and there have been others.

If you are interested, you can read the comments on that ticket, but I
think the problem is simple enough that I can summarize it below.

The potential problem is pretty obvious in that we have a hard-coded
list of temporary files that we think we should remove before compiling
again after an error (you can see this list in
LaTeX::removeAuxiliaryFiles()). I think that the list is imperfect and
will always be imperfect (don't some packages have their own temporary
files that they keep?). As for why keeping temporary files can lead to
an error, I don't actually know, but I've seen it happen often enough.

From what I understand, the reason why we keep temporary files around at
all is that they can speed up subsequent compilations. It seems to me
that this caching works well in the case where there is no error, so
unless others disagree we do not need to debate about this situation.

On the other hand, keeping temporary files around has been a source of
bugs for the situation where we are compiling after there was an error.
I think the main question that needs an answer is:

Are there any temporary files that we want to keep after a compilation
error?

If not, it seems we can just have a fresh start when compiling again
after an error. That is, instead of using the hard-coded list, we just
remove all temporary files.

Scott

Attachment: signature.asc
Description: PGP signature

Reply via email to