Script compatibility before release 0.5
I was reading finalized SRFI-22 (Running Scheme Scripts on Unix) and realized Gauche's convention of calling "main" from gosh was incompatible with it.
Rather than keeping incompatibility to the SRFI until too late to change, I decided to take this change now, when Gauche is still early stage of development.
Unfortunately, this change likely make the Scheme scripts that was written for older Gauche no longer work.
The incompantible changes are the following two points:
- The argument list passed to "main" now includes the script name itself as the first element. In older version, only the arguments after the script file name are passed.
- When "main" returns non-integral value, gosh exits with code 70 (EX_SOFTWARE). In older versions, gosh exits with code 0 in such a case.
To help transition, you can make gosh behave as older version either (a) by passing command line argument -fcompat-0.5 or (b) by setting an environment variable GAUCHE_COMPAT_0_5. Doing so, you can run Scheme scripts written for previous Gauche unchanged.
This backward compatibility feature is a temporary solution, and will be removed after several releases. I encourage you to move to the new, SRFI-22 compliant interface by then.