Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Negative metadata phase is inconsistent / not defined #3647

Open
davidot opened this issue Aug 29, 2022 · 0 comments
Open

Negative metadata phase is inconsistent / not defined #3647

davidot opened this issue Aug 29, 2022 · 0 comments

Comments

@davidot
Copy link

davidot commented Aug 29, 2022

In INTERPRETING.md it says:

phase - the stage of the test interpretation process that the error is expected to be produced; valid phases are:
- parse: occurs while parsing the source text, or while checking it for early errors.
- resolution: occurs during module resolution.
- runtime: occurs during evaluation.

However where these phases start and end is not well defined.
Additionally it seems that for some test it is contradictory:
test/language/import/json-invalid.js: has phase parse, presumably because the json module it imports has a SyntaxError.
test/language/module-code/instn-resolve-err-syntax-1.js: has phase resolution, however it too fails because it imports a module with a SyntaxError.
test/language/module-code/instn-star-err-not-found.js: has phase runtime, perhaps because the module it is importing will throw a SyntaxError during evalution however this is (in my view?) in resolution time for the initial test.

It is possible I'm missing something here, but in the spec the terms phase nor the named phases are defined.

The solution for our test262 runner I have come up with is assuming that if a SyntaxError is supposed to be thrown for a module, then if the initial module was not supposed to be evaluated it will contain $DONOTEVALUATE(), is this safe? Or is there a better solution?
(See linusg/libjs-test262#58 or I can explain further)

@davidot davidot changed the title Negative metadata phase is inconsistent / ill-defined Negative metadata phase is inconsistent / not defined Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant