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

vm: rename vm.Module to vm.SourceTextModule #22007

Merged
merged 1 commit into from
Jul 31, 2018

Conversation

devsnek
Copy link
Member

@devsnek devsnek commented Jul 28, 2018

Should have always been named SourceTextModule

/cc @nodejs/vm

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

@devsnek devsnek added the vm Issues and PRs related to the vm subsystem. label Jul 28, 2018
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. process Issues and PRs related to the process subsystem. vm Issues and PRs related to the vm subsystem. labels Jul 28, 2018
@devsnek
Copy link
Member Author

devsnek commented Jul 28, 2018

@targos
Copy link
Member

targos commented Jul 28, 2018

Is it in preparation for adding other kinds of modules?

@devsnek
Copy link
Member Author

devsnek commented Jul 28, 2018

@targos mostly... even if the spec doesn't define any more types we should still name them correctly.

@cjihrig cjihrig added the semver-major PRs that contain breaking changes and should be released in the next major version. label Jul 28, 2018
Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

No opinion on the change, but the code LGTM.

@targos
Copy link
Member

targos commented Jul 28, 2018

It doesn't have to be semver major. The API is experimental and behind a flag

@TimothyGu TimothyGu removed the semver-major PRs that contain breaking changes and should be released in the next major version. label Jul 28, 2018
@addaleax
Copy link
Member

Not that you have to, but can you explain this? What kind of ES modules would not have some kind of source text associated with them? If this is to distinguish from e.g. WASM modules or so, maybe referring to the used language might be better?

(Also, fyi: @nodejs/modules)

@TimothyGu
Copy link
Member

TimothyGu commented Jul 28, 2018

@addaleax At the last TC39 meeting, a new type of Module Records backed by JavaScript source called Dynamic Module Records was discussed, and it is now at Stage 1. Regardless of whether that proposal makes it all the way into the spec, SourceTextModule is indeed a more descriptive and accurate name for what this class represents.

@TimothyGu
Copy link
Member

@devsnek Would also be nice if my last comment (#22007 (comment)) is integrated into the commit message body.

@devsnek
Copy link
Member Author

devsnek commented Jul 29, 2018

@TimothyGu will do when I land 👍

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

LGTM

@targos
Copy link
Member

targos commented Jul 29, 2018

At the last TC39 meeting, a new type of Module Records backed by
JavaScript source called Dynamic Module Records was discussed, and
it is now at Stage 1. Regardless of whether that proposal makes it
all the way into the spec, SourceTextModule is indeed a more
descriptive and accurate name for what this class represents.

PR-URL: nodejs#22007
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Jan Krems <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: John-David Dalton <[email protected]>
Reviewed-By: Bradley Farias <[email protected]>
@devsnek devsnek closed this Jul 31, 2018
@devsnek devsnek merged commit 2bdcdfc into nodejs:master Jul 31, 2018
@devsnek devsnek deleted the rename-vm-module branch July 31, 2018 15:25
@devsnek
Copy link
Member Author

devsnek commented Jul 31, 2018

landed in 2bdcdfc

targos pushed a commit that referenced this pull request Aug 1, 2018
At the last TC39 meeting, a new type of Module Records backed by
JavaScript source called Dynamic Module Records was discussed, and
it is now at Stage 1. Regardless of whether that proposal makes it
all the way into the spec, SourceTextModule is indeed a more
descriptive and accurate name for what this class represents.

PR-URL: #22007
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Jan Krems <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: John-David Dalton <[email protected]>
Reviewed-By: Bradley Farias <[email protected]>
@targos targos mentioned this pull request Aug 1, 2018
@refack refack mentioned this pull request Oct 18, 2018
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. process Issues and PRs related to the process subsystem. vm Issues and PRs related to the vm subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.