spec icon indicating copy to clipboard operation
spec copied to clipboard

Don't emit `module definition` or `module instance` unless present in input when generating `.bin.wast`

Open titzer opened this issue 1 year ago • 2 comments

The PR #1796 changed the reference interpreter to generate these new commands by default in arrange.ml. Unfortunately this breaks downstream clients that consume .bin.wast.

Would it be possible to only emit module definition and module instance if they were in the original source?

titzer avatar Sep 23 '24 23:09 titzer

I'll look into it. It might be non-trivial, since the old form is desugared in the parser already.

Edit: Won't these clients have to be adapted anyway? Otherwise they won't be able to run all tests either way.

rossberg avatar Sep 24 '24 09:09 rossberg

Ok, thanks for taking a look. If it's nontrivial work, don't waste too much time on it.

Won't these clients have to be adapted anyway? Otherwise they won't be able to run all tests either way.

Yes, eventually, when tests start using the new feature. I just hit this because I was writing tests for the stack-switching proposal which recently had this change integrated, and thus Wizard couldn't run my new tests.

titzer avatar Sep 24 '24 10:09 titzer