justinwoo / spago2nix

Generate a derivation of (old) Spago dependencies, and use them to install them into the directory structure used by Spago.
MIT License
42 stars 23 forks source link

Doesn't crash nix-build on spago build errors #25

Open chekoopa opened 4 years ago

chekoopa commented 4 years ago

Got some errors on missing main module from Parcel, and only few retries later my eye caught few compie errors. After quick research I've realized that buildSpagoStyle script always exits with zero code, which would be inconvenient and error-prone.

I propose replacing:

purs compile ...
echo done.

with something like

purs compile ... && echo done.

So it would notify at successful builds only and keep build flow consistent.

justinwoo commented 4 years ago

the related code is here: https://github.com/justinwoo/spago2nix/blob/master/src/Generate.purs#L148-L168

do you want to make a PR for setting -e flags for the scripts? we can also remove them altogether to be honest.