Improved mechanism for compilation exit code
- Dominant language
- Standard ML
- Stars
- 1.2k
- Forks
- 104
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 16
Description
The current mechanism for determining the exit code at the end of compilation is based on the final compilation output, which is a pair of strings corresponding to the `stdout` and `stderr` output. If the final `stderr` output starts with `###`, which is printed at the beginning of error messages, the compiler will have a non-zero exit code. (See [condition](https://github.com/CakeML/cakeml/blob/e9cafe6795f84d7458975af3f196d67c126c9763/compiler/compilerScript.sml#L321) and its [application](https://github.com/CakeML/cakeml/blob/e9cafe6795f84d7458975af3f196d67c126c9763/compiler/bootstrap/translation/compiler32ProgScript.sml#L334)). Most failures in the compilation stages cause such an error message. Separately to this, all current success cases provide non-empty `stdout` output and all current failure cases provide empty `stdout` output.
In general, it would be nice if this mechanism was not so dependent on this specific prefix, and the final compilation output was more explicit about which exit code applied.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.