Skip to content
This repository was archived by the owner on May 20, 2020. It is now read-only.
This repository was archived by the owner on May 20, 2020. It is now read-only.

Comment-only input files no longer rejected by 1.0.13 #77

@lars-t-hansen

Description

@lars-t-hansen

After upgrading to 1.0.13, some tests in the SpiderMonkey wasm test suites that were supposed to fail stopped failing, this is from wasm/comments.js:

assertErrorMessage(() => wasmEvalText(';; only comment'), SyntaxError, /wasm text error/);
assertErrorMessage(() => wasmEvalText(';; only comment\n'), SyntaxError, /wasm text error/);
assertErrorMessage(() => wasmEvalText('(; only comment ;)'), SyntaxError, /wasm text error/);
assertErrorMessage(() => wasmEvalText(';; only comment\n'), SyntaxError, /wasm text error/);

These test that a comment by itself does not make a source file; the source file has to define a module, as suggested by https://webassembly.github.io/spec/core/text/modules.html#text-module. Clearly a text processor can do whatever it wants here but at least there's a discussion to be had.

I'm not dogmatic on this but I'd love to know if this change was deliberate or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions