Caching in InstantFPC lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- Igor · 2020-05-22 06:57 I wrote a simple InstantFPC script for macOS, but it returns old cached output. I call ./UpdateVersion.pas which includes ProductVersion.pas and version number from that file. Now if I update a version number in GetMajor() function in ProductVersion.pas and then call ./UpdateVersion.pas script it outputs old cached value. The only solution I found is to use parameter -B for InstantFPC to always compile the script. UpdateVersion.pas Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i #!/usr/bin/env instantfpc {$mode delphi} uses Classes, SysUtils; {$I ProductVersion.pas}  begin  writeln('MajorVersion: '+GetMajor(''));end. ProductVersion.pas Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function GetMajor(Param: String): String;begin  Result:='11';end;  P.S. I use $I directive instead of uses because same ProductVersion.pas file is used in InnoSetup pascal script to build the installation file on Windows. ---------------------------------------------------------------------- Thaddy · 2020-05-22 07:21 I think you already found the answer yourself: -B Reason: if you touch the script code in any way, the "script" needs to be re-compiled. InstantFPC scripts are actually compiled code, and that code can be cached for re-use. If you touch that code... InstantFPC is not a scripting engine.... ---------------------------------------------------------------------- Igor · 2020-05-22 07:35 If I touch a main script, it re-compiles automatically. It seems that the caching code doesn't check included pascal files which also might be modified. However I'm happy with InstantFPC, a very useful tool to write scripts to build my app bundle on macOS.