Open straight-shoota opened 1 week ago
I dropped the test code for exit_code
because it was failing on Windows. It was unrelated to this change anyway. I'll investigate further and add it in a follow-up.
An upside of the $CRYSTAL env variable is that if the compiler is not crystal but something else crystal-1.0, crystal-1.14, crystal-2 then the external commands still works.
I don't mind prepending to the $PATH and having a $CRYSTAL_EXEC_PATH, but I don't see how we enable binaries named differently.
$CRYSTAL is also used in shards as a convention, so I thought it was convenient to keep the same pattern. (which happens to be the same as in cabal with $CABAL)
If no one thinks that supporting different names of the compiler binary is needed then 👍
The interface between the compiler and extension scripts is likely to be a long-lived interface, so I think it's worth spending the time to get it working when the compiler isn't named just crystal
. This PR is an improvement already, but I think using $CRYSTAL
is a good thing to encourage.
Resolves #15145