genlib() does not regenerate a missing .bin if the .sci is unchanged (Scilab 6 regression)
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
After having generated a library a first time with genlib(), if for some reason a .bin file is removed but the corresponding .sci source file is unchanged, rebuilding the library does not regenerate the missing .bin.
This behavior is error prone: the lib file is available, loading the library with lib() is done without error,
but the first call to the function with the missing .bin sets Scilab in an unknown behavior (not responding anymore).
--> path = TMPDIR + "\test";
--> rmdir(path, 's');
--> mkdir(path);
--> mputl("function a=pi(), a = %pi; endfunction", path+"\pi.sci");
--> genlib("pilib", path)
ans =
T
--> deletefile(path+"\pi.bin")
ans =
T
--> clear pilib
--> genlib("pilib", path)
ans =
T
--> isfile(path+"\pi.bin")
ans =
F // <<<<< THE BUG
--> pilib
pilib =
Emplacement des fichiers des fonctions : TMPDIR\test\.
pi
--> pi // => CRASH
ERROR LOG:
----------
none. Wrong behavior, but leading to a crash when the missing bin is "called".
HOW TO REPRODUCE THE BUG:
-------------------------
path = TMPDIR + "\test";
rmdir(path, 's');
mkdir(path);
mputl("function a=pi(), a = %pi; endfunction", path+"\pi.sci");
genlib("pilib", path)
deletefile(path+"\pi.bin")
clear pilib
genlib("pilib", path)
isfile(path+"\pi.bin")
pilib
pi() // => crash
OTHER INFORMATION:
------------------
Same issue with Scilab 6.0.1