For each time qcompiling a file, say,
eh.pl, a new empty dot file, for example,
.eh.qlf.76122
is generated. What is the dot file for ?
I was surprised to happen to see so
many such empty dot files in emacs-dired buffer.
As far as I tested, it seems no problem to delete
them.
Since some time, qcompiling eh.pl creates .eh.qlf.<PID> and only after successful completion moves this file to eh.qlf. On error it should remove the temporary file. This avoids incomplete .qlf files from being opened and thereby avoids crashes from concurrent creation and access to a .qlf file. I tried some trivial things to reproduce, but for me it all works fine.
Since some time, qcompiling eh.pl creates .eh.qlf.<PID> and only after successful completion moves this file to eh.qlf. On error it should remove the temporary file. This avoids incomplete .qlf files from being opened and thereby avoids crashes from concurrent creation and access to a .qlf file. I tried some trivial things to reproduce, but for me it all works fine.
Thanks Jan,
I see that such empty dot files should not be seen after successful
qcompiling. So there might be something wrong with
my qcompiling. I will try to find a correct use of qcompiling
After reading the SWI manual on command line options,
I have managed to find a way for not generating the .eh.qlf. file
by relacing a line (A) with (B):
(A)
:- eh:scriptstart.
(B)
:- initialization(eh:scriptstart, main).
Although it works without generating the dot file, it
generates in stead a qsaved state. As I moved to qcompiling
from qsaved states, I am not satisfied with the current
workaround. Rather, it seems to me the genereated dot files should be
cleanup by the SWI compiler.
Using :- eh:scripstart is not standard compliant, but in this case much worse, it causes the compilation of the file not to complete until scriptstart is finished. Now, I could guess you call halt/0 when your script is finished and thus compilation is never completed. So, always run your entry goal with initialization. ISO defines initialization/1. SWI-Prolog has more subtle ways as you have found
I don’t really see what this has to do with qlf files vs. saved states.
I guess there should be a halt hook that cleans up incomplete qlf files.