GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — module: add changes that should have been in 18394 by devsnek · Pull Request #18509 · nodejs/node

Conversation

@devsnek

@devsnek devsnek commented Feb 1, 2018 •
edited by TimothyGu
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

these changes make it so that the new behavior of ModuleWrap::Link will be used by vm.Module and enforced by tests for vm.Module, and as we don't specifically test our internal bindings i think this will be good enough.

See: #18394

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

src, vm

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. vm Issues and PRs related to the vm subsystem. labels Feb 1, 2018
@devsnek

devsnek commented Feb 1, 2018

Copy link
Copy Markdown
Member Author

cc @iamstolis

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR

BridgeAR commented Feb 1, 2018

Copy link
Copy Markdown
Member

@devsnek is it possible to add a test for this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@devsnek

devsnek commented Feb 1, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

@BridgeAR i'm not sure exactly how, we don't expose ModuleWrap itself and generally we test implementations not their native backing right? i originally couldn't figure out how to test this because i wasn't sure how to insert a super long job into the node loader, but its usage in vm.Module ensures the behavior works, which is how i caught that bug with settings the elements of the promise array.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR

BridgeAR commented Feb 1, 2018

Copy link
Copy Markdown
Member

Hm ok. If someone has an idea: I guess it would be nice to add a test just to make sure.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iamstolis

iamstolis commented Feb 1, 2018

Copy link
Copy Markdown

Looks good to me, thanks for the fix.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

TimothyGu
TimothyGu reviewed Feb 1, 2018
View reviewed changes

@TimothyGu TimothyGu left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I should've caught this sooner... LGTM with tests.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bnoordhuis

bnoordhuis commented Feb 1, 2018

Copy link
Copy Markdown
Member

...and a better commit log. What changes? Why?

TimothyGu reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@devsnek

devsnek commented Feb 1, 2018

Copy link
Copy Markdown
Member Author

afaik there's no way to test internalBinding modules, if anyone has an idea on how to do that please let me know

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos

targos commented Feb 1, 2018

Copy link
Copy Markdown
Member

afaik there's no way to test internalBinding modules, if anyone has an idea on how to do that please let me know

You can export the binding from an internal/ module

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@devsnek

devsnek commented Feb 1, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

@targos that seems pretty messy, maybe we can provide internalBinding to certain tests by folder or something similar? (perhaps tests/internal, as a separate pr, although i don't want to block this pr, i'm very conflicted rn, i'll add it for this pr and then look into removing it later)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@devsnek
devsnek force-pushed the fix/module-linking branch 4 times, most recently from d753441 to 968ca4a Compare February 3, 2018 20:00
@devsnek
module: add changes that should have been in 18394
35a175a
* switch vm.Module internals to use the new link method properly
* fix bug with ModuleWrap::Link
* add tests for ModuleWrap::Link
@devsnek
devsnek force-pushed the fix/module-linking branch from 968ca4a to 35a175a Compare February 3, 2018 20:04
TimothyGu
TimothyGu approved these changes Feb 3, 2018
View reviewed changes
@TimothyGu

TimothyGu commented Feb 3, 2018

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TimothyGu

TimothyGu commented Feb 4, 2018

Copy link
Copy Markdown
Member

Landed in b0f114d.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TimothyGu TimothyGu closed this Feb 4, 2018
@TimothyGu TimothyGu mentioned this pull request Feb 4, 2018
Fragile/buggy implementation of ES module loading #18249
Closed
TimothyGu pushed a commit that referenced this pull request Feb 4, 2018
@devsnek @TimothyGu
loader: fix up #18394
b0f114d
This commit fixes up some issues in #18394.

* Switch vm.Module internals to use the new link method properly
* Fix bug with ModuleWrap::Link
* Add tests for ModuleWrap::Link

PR-URL: #18509
Fixes: #18249
Refs: #18394
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
@devsnek
devsnek deleted the fix/module-linking branch February 4, 2018 21:51
@MylesBorins MylesBorins added the backport-requested-v9.x label Feb 20, 2018
@MylesBorins MylesBorins mentioned this pull request Feb 21, 2018
vm: add module support #17560
Closed
4 tasks done
@MylesBorins

MylesBorins commented Feb 21, 2018

Copy link
Copy Markdown
Contributor

This should come with #17560 when it is backported

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@devsnek

devsnek commented Feb 21, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

this should be directly backported with #18394 not #17560 or the loader will stop working. i'm not sure what to do about the changes to the vm module file

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@devsnek devsnek mentioned this pull request Feb 21, 2018
[9.x backport] 17560, 18471, 18509 #18891
Closed
2 tasks done
devsnek added a commit to devsnek/node that referenced this pull request Feb 21, 2018
@devsnek
loader: fix up nodejs#18394
f934e4b
This commit fixes up some issues in nodejs#18394.

* Switch vm.Module internals to use the new link method properly
* Fix bug with ModuleWrap::Link
* Add tests for ModuleWrap::Link

PR-URL: nodejs#18509
Fixes: nodejs#18249
Refs: nodejs#18394
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
@devsnek @MylesBorins
loader: fix up #18394
0e105ae
This commit fixes up some issues in #18394.

* Switch vm.Module internals to use the new link method properly
* Fix bug with ModuleWrap::Link
* Add tests for ModuleWrap::Link

PR-URL: #18509
Fixes: #18249
Refs: #18394
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
@devsnek @MylesBorins
loader: fix up #18394
d1d7405
This commit fixes up some issues in #18394.

* Switch vm.Module internals to use the new link method properly
* Fix bug with ModuleWrap::Link
* Add tests for ModuleWrap::Link

PR-URL: #18509
Fixes: #18249
Refs: #18394
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Feb 21, 2018
v9.6.0 proposal #18902
Merged
@devsnek devsnek added backported-to-v9.x and removed backport-requested-v9.x labels Feb 21, 2018
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
@devsnek @MylesBorins
loader: fix up #18394
cb36b67
This commit fixes up some issues in #18394.

* Switch vm.Module internals to use the new link method properly
* Fix bug with ModuleWrap::Link
* Add tests for ModuleWrap::Link

PR-URL: #18509
Fixes: #18249
Refs: #18394
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
@MylesBorins MylesBorins added the dont-land-on-v6.x label Apr 13, 2018
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
@devsnek @MayaLekova
loader: fix up nodejs#18394
e618459
This commit fixes up some issues in nodejs#18394.

* Switch vm.Module internals to use the new link method properly
* Fix bug with ModuleWrap::Link
* Add tests for ModuleWrap::Link

PR-URL: nodejs#18509
Fixes: nodejs#18249
Refs: nodejs#18394
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
@MylesBorins MylesBorins added the backport-requested-v8.x label Aug 7, 2018
@MylesBorins

MylesBorins commented Aug 7, 2018

Copy link
Copy Markdown
Contributor

Should this be backported to v8.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@TimothyGu TimothyGu TimothyGu approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. vm Issues and PRs related to the vm subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@devsnek @BridgeAR @iamstolis @bnoordhuis @targos @TimothyGu @MylesBorins @nodejs-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.