anhkhoan closed issue #5: Unable to run with illustrator disabled at jrspence...

anhkhoan
2024-08-03T21:38:26-07:00

Commit: f9efc343
Working command: ./bin/audioamplifier -enable-illustrator -f 2 ./demo.wav -o ./loud1.wav
Failing command: ./bin/audioamplifier -f 2 ./demo.wav -o ./loud2.wav
Requires file: demo.wav

Description:

As I understand it, Parabix uses lazy evaluation to first check whether to JIT compile the code at all. It does this by figuring out what has output and what has side effects, and then works backwards to make sure that everything necessary has been compiled and run. The illustrator enforces that either everything, or all the items printed out, are known to the compiler to be necessary for compilation, as a way to ensure that quick tests and hacks can be analyzed even without establishing a complete framework with I/O.

In our code, we use makePipelineWithIO to return a buffer stream, which we then then append to a file with a newly generated .wav header. Somewhere along the way, Parabix thinks we don't actually need all the operations, and throws some away. Not all, because we get consistently incorrect results. We have tried labelling the output as side-effecting, but that didn't seem to work. How can we made our code run without running the illustrator?