PMunch/futhark

[Windows] Futhark can fail if opir outputs warnings *after* the JSON output

Yardanico opened this issue · 3 comments

staticExec runs the process with poStdErrToStdOut, so if opir gives out any warnings after the JSON output, the last line won't be the JSON but the warning itself, resulting in Futhark failing to parse valid opir's output.

Relevant line in Futhark - https://github.com/PMunch/futhark/blob/master/src/futhark.nim#L525

Hmm, do you know what the warning is? I guess moving opir.nim:399 to the end of the file would fix this issue, could you try this?

@PMunch it's a warning about an unknown cursor from some Windows headers. I'll try your fix and see if it works

Seems like the root cause is that the output has a trainling newline, so splitLines returns an empty string as the last one:
image