json-from-wast: name emitted files after the output stem#2542
json-from-wast: name emitted files after the output stem#2542eyupcanakman wants to merge 1 commit into
Conversation
|
Thanks! The CI failure might be some CRLF thing, but I'm not entirely sure. Out of curiosity though, could you explain a bit more why you want an exact match? Naively it seems good to strip the leading |
|
It was just to match wast2json more closely, but your question made me check who consumes this, and chicory (which runs json-from-wast) parses the i32/i64 values as signed, so the unsigned change would break their |
|
That sounds reasonable to me, yeah 👍 |
The emitted `*.wasm` and `*.wat` files used the source `.wast` stem, so `-o out.json` wrote `<source>.0.wasm` instead of `out.0.wasm` like `wast2json`. Derive the stem from the `-o` output path when present and fall back to the source stem otherwise. Refs bytecodealliance#1471.
ff56368 to
80bdb63
Compare
|
Trimmed this to just the filename change and reverted the int and name bits along with the snapshots. The Windows fail was the cli test runner handing a backslash path to |
json-from-wastnamed its emitted*.wasmand*.watfiles after the source.waststem, so-o out.jsonstill wrote<source>.0.wasmrather thanout.0.wasmthe waywast2jsondoes. This derives the stem from the-ooutput path when one is given and falls back to the source stem otherwise. Added a cli test for both cases.Refs #1471.