jpcima / faustpp

A post-processor for faust, which allows to generate with more flexibility
Boost Software License 1.0
23 stars 3 forks source link

CLI option for output file instead of stdout #12

Closed falkTX closed 2 years ago

falkTX commented 2 years ago

While having faustpp output to stdout is fine for local usage, it is a problem for repeated/automated builds. This is because using "x > y" syntax always creates a file even if the command that outputs to console fails, which can be a problem when faustpp is part of a build system pre-build step for example (the file is always created even if something fails).

Would be best for faustpp to be the one generating the output file, preferably only doing so if all early checks pass.

jpcima commented 2 years ago

It's implemented in 466f234.

falkTX commented 2 years ago

thanks!

falkTX commented 2 years ago

sadly the current implementation does not work as expected. when the file has errors (for example the "identifier" name was not used/set), an empty output file is still generated.

jpcima commented 2 years ago

You're right, this is fixed now

falkTX commented 2 years ago

confirmed it works, thanks!

it is a bit weird that it deletes existing files if previous successful generation was done but new one fails, but not really a problem really, just a small oddity.