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

src: add support for top level await #30370

Merged
merged 1 commit into from
May 14, 2020
Merged

Conversation

devsnek
Copy link
Member

@devsnek devsnek commented Nov 12, 2019

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Blockers

@devsnek devsnek added vm Issues and PRs related to the vm subsystem. experimental Issues and PRs related to experimental features. esm Issues and PRs related to the ECMAScript Modules implementation. labels Nov 12, 2019
@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Nov 12, 2019
@devsnek devsnek removed the c++ Issues and PRs that require attention from people who are familiar with C++. label Nov 12, 2019
@devsnek
Copy link
Member Author

devsnek commented Nov 12, 2019

cc @nodejs/modules-active-members

TLA modules always evaluate to undefined, so this breaks node -pe for modules

src/module_wrap.cc Outdated Show resolved Hide resolved
@devsnek

This comment has been minimized.

@lin7sh

This comment has been minimized.

@devsnek

This comment has been minimized.

@devsnek devsnek force-pushed the feature-tla branch 3 times, most recently from 7479161 to 3bb22b2 Compare November 12, 2019 09:07
@bnoordhuis

This comment has been minimized.

@devsnek

This comment has been minimized.

@bnoordhuis

This comment has been minimized.

@devsnek

This comment has been minimized.

@jkrems

This comment has been minimized.

@devsnek

This comment has been minimized.

@devsnek
Copy link
Member Author

devsnek commented Nov 12, 2019

opened v8:9968 to address the cache issue.

@devsnek devsnek added the blocked PRs that are blocked by other issues or PRs. label Nov 12, 2019
@guybedford
Copy link
Contributor

Great work. Are there any roadblocks to asyncifying node -pe lifecycle? Those are the only failing tests?

@devsnek
Copy link
Member Author

devsnek commented Nov 12, 2019

@guybedford it evaluates fine. the difference is that TLA modules always evaluate to undefined, so -p is kind of useless.

I'm not sure whether -p for modules should throw or just be undefined. Thoughts?

@guybedford
Copy link
Contributor

Surely the promise can still return the last expression output though? Perhaps a v8 feature?

@guybedford
Copy link
Contributor

I guess -p for modules makes no sense actually... Let's just make sure we properly throw for this case always.

@weswigham

This comment has been minimized.

@devsnek

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

@MylesBorins
Copy link
Contributor

If there are no objections I would like to land this in 48 hours

@devsnek
Copy link
Member Author

devsnek commented May 12, 2020

@MylesBorins i'd like addaleax to review the changes i made to the options parser first.

Copy link
Contributor

@frank-dspeed frank-dspeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/module_wrap.cc Show resolved Hide resolved
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/31316/

PR-URL: nodejs#30370
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
@devsnek
Copy link
Member Author

devsnek commented May 14, 2020

Landed in 5ae5262

@devsnek devsnek merged commit 5ae5262 into nodejs:master May 14, 2020
@devsnek devsnek deleted the feature-tla branch May 14, 2020 17:41
@devsnek devsnek added the notable-change PRs with changes that should be highlighted in changelogs. label May 14, 2020
MylesBorins pushed a commit that referenced this pull request May 14, 2020
PR-URL: #30370
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
codebytere added a commit that referenced this pull request May 18, 2020
Notable changes:

async_hooks:
  * (SEMVER-MINOR) move PromiseHook handler to JS (Stephen Belanger) #32891
cli:
  * (SEMVER-MINOR) add `--trace-atomics-wait` flag (Anna Henningsen) #33292
fs:
  * (SEMVER-MINOR) add .ref() and .unref() methods to watcher classes (rickyes) #33134
http:
  * (SEMVER-MINOR) expose http.validate-header-name/value (osher) #33119
repl:
  * (SEMVER-MINOR) deprecate repl._builtinLibs (Ruben Bridgewater) #33294
  * (SEMVER-MINOR) remove obsolete completer variable (Ruben Bridgewater) #33294
  * (SEMVER-MINOR) deprecate repl.inputStream and repl.outputStream (Ruben Bridgewater) #33294
  * (SEMVER-MINOR) improve repl autocompletion for require calls (Ruben Bridgewater) #33282
  * (SEMVER-MINOR) replace hard coded core module list with actual list (Ruben Bridgewater) #33282
  * (SEMVER-MINOR) show reference errors during preview (Ruben Bridgewater) #33282
  * (SEMVER-MINOR) improve repl preview (Ruben Bridgewater) #33282
src:
  * add support for TLA (Gus Caplan) #30370
test:
  * (SEMVER-MINOR) refactor test/parallel/test-bootstrap-modules.js (Ruben Bridgewater) #33282

PR-URL: TODO
@codebytere codebytere mentioned this pull request May 18, 2020
codebytere added a commit that referenced this pull request May 19, 2020
Notable changes:

async_hooks:
  * (SEMVER-MINOR) move PromiseHook handler to JS (Stephen Belanger) #32891
cli:
  * (SEMVER-MINOR) add `--trace-atomics-wait` flag (Anna Henningsen) #33292
fs:
  * (SEMVER-MINOR) add .ref() and .unref() methods to watcher classes (rickyes) #33134
http:
  * (SEMVER-MINOR) expose http.validate-header-name/value (osher) #33119
repl:
  * (SEMVER-MINOR) deprecate repl._builtinLibs (Ruben Bridgewater) #33294
  * (SEMVER-MINOR) deprecate repl.inputStream and repl.outputStream (Ruben Bridgewater) #33294
  * (SEMVER-MINOR) show reference errors during preview (Ruben Bridgewater) #33282
  * (SEMVER-MINOR) improve repl preview (Ruben Bridgewater) #33282
src:
  * add support for TLA (Gus Caplan) #30370

PR-URL: TODO
codebytere added a commit that referenced this pull request May 19, 2020
Notable changes:

async_hooks:
  * (SEMVER-MINOR) move PromiseHook handler to JS (Stephen Belanger) #32891
cli:
  * (SEMVER-MINOR) add `--trace-atomics-wait` flag (Anna Henningsen) #33292
fs:
  * (SEMVER-MINOR) add .ref() and .unref() methods to watcher classes (rickyes) #33134
http:
  * (SEMVER-MINOR) expose http.validate-header-name/value (osher) #33119
repl:
  * (SEMVER-MINOR) deprecate repl._builtinLibs (Ruben Bridgewater) #33294
  * (SEMVER-MINOR) deprecate repl.inputStream and repl.outputStream (Ruben Bridgewater) #33294
  * (SEMVER-MINOR) show reference errors during preview (Ruben Bridgewater) #33282
  * (SEMVER-MINOR) improve repl preview (Ruben Bridgewater) #33282
src:
  * add support for TLA (Gus Caplan) #30370

PR-URL: TODO
codebytere added a commit that referenced this pull request May 19, 2020
Notable changes:

async_hooks:
  * (SEMVER-MINOR) move PromiseHook handler to JS (Stephen Belanger) #32891
cli:
  * (SEMVER-MINOR) add `--trace-atomics-wait` flag (Anna Henningsen) #33292
fs:
  * (SEMVER-MINOR) add .ref() and .unref() methods to watcher classes (rickyes) #33134
http:
  * (SEMVER-MINOR) expose http.validate-header-name/value (osher) #33119
repl:
  * (SEMVER-MINOR) deprecate repl._builtinLibs (Ruben Bridgewater) #33294
  * (SEMVER-MINOR) deprecate repl.inputStream and repl.outputStream (Ruben Bridgewater) #33294
  * (SEMVER-MINOR) show reference errors during preview (Ruben Bridgewater) #33282
  * (SEMVER-MINOR) improve repl preview (Ruben Bridgewater) #33282
src:
  * add support for TLA (Gus Caplan) #30370

PR-URL: TODO
codebytere added a commit that referenced this pull request May 19, 2020
Notable changes:

async_hooks:
  * (SEMVER-MINOR) move PromiseHook handler to JS (Stephen Belanger) #32891
cli:
  * (SEMVER-MINOR) add `--trace-atomics-wait` flag (Anna Henningsen) #33292
fs:
  * (SEMVER-MINOR) add .ref() and .unref() methods to watcher classes (rickyes) #33134
http:
  * (SEMVER-MINOR) expose http.validate-header-name/value (osher) #33119
repl:
  * (SEMVER-MINOR) deprecate repl._builtinLibs (Ruben Bridgewater) #33294
  * (SEMVER-MINOR) deprecate repl.inputStream and repl.outputStream (Ruben Bridgewater) #33294
  * (SEMVER-MINOR) show reference errors during preview (Ruben Bridgewater) #33282
  * (SEMVER-MINOR) improve repl preview (Ruben Bridgewater) #33282
src:
  * add support for TLA (Gus Caplan) #30370

PR-URL: #33452
@codebytere
Copy link
Member

@devsnek can this go back to v12.x? I'm not sure if the version of v8 on that branch is compatible, so i figured i'd ask before trying

@devsnek
Copy link
Member Author

devsnek commented Jun 9, 2020

@codebytere i don't think anything here is compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. experimental Issues and PRs related to experimental features. notable-change PRs with changes that should be highlighted in changelogs. vm Issues and PRs related to the vm subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.