udem-dlteam / pnut

🥜 A Self-Compiling C Transpiler Targeting Human-Readable POSIX Shell
https://pnut.sh
BSD 2-Clause "Simplified" License
425 stars 14 forks source link

Add CI check for certain pnut-sh options #85

Closed laurenthuberdeau closed 2 months ago

laurenthuberdeau commented 2 months ago

Context

The code gated by the OPTIMIZE_CONSTANT_PARAM option needs to be kept in sync with the rest of the shell code generator to handle all statements or else the compiler crashes. Because it's disabled by default it's easy to forget to update it when handling new kinds of AST nodes. That has happened a few times before (https://github.com/udem-dlteam/pnut/pull/46/commits/564a2abe4f3ea54bbff114ba11dcfc6ae29dd32c and https://github.com/udem-dlteam/pnut/pull/25/commits/a49f91f234aba50569e2c0b4202d50ab68c1b98b) and just happened so let's add a CI check so we don't need to remember.

This last PR also revealed a bug in the examples-up-to-date CI check where missing compiled files didn't trigger the files are out of date error.