Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
module: add changes that should have been in 18394#18509
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
devsnek commented Feb 1, 2018 • edited by TimothyGu
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by TimothyGu
Uh oh!
There was an error while loading. Please reload this page.
devsnek commented Feb 1, 2018
cc @iamstolis |
BridgeAR commented Feb 1, 2018
@devsnek is it possible to add a test for this? |
devsnek commented Feb 1, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@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. |
BridgeAR commented Feb 1, 2018
Hm ok. If someone has an idea: I guess it would be nice to add a test just to make sure. |
iamstolis commented Feb 1, 2018
Looks good to me, thanks for the fix. |
TimothyGu left a comment • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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.
bnoordhuis commented Feb 1, 2018
...and a better commit log. What changes? Why? |
devsnek commented Feb 1, 2018
afaik there's no way to test internalBinding modules, if anyone has an idea on how to do that please let me know |
targos commented Feb 1, 2018
You can export the binding from an internal/ module |
devsnek commented Feb 1, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@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) |
d753441 to 968ca4aCompare* switch vm.Module internals to use the new link method properly * fix bug with ModuleWrap::Link * add tests for ModuleWrap::Link
968ca4a to 35a175aCompareTimothyGu commented Feb 3, 2018
TimothyGu commented Feb 4, 2018
Landed in 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: #18509Fixes: #18249 Refs: #18394 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
MylesBorins commented Feb 21, 2018
This should come with #17560 when it is backported |
devsnek commented Feb 21, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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#18509Fixes: nodejs#18249 Refs: nodejs#18394 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
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: #18509Fixes: #18249 Refs: #18394 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
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: #18509Fixes: #18249 Refs: #18394 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
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: #18509Fixes: #18249 Refs: #18394 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
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#18509Fixes: nodejs#18249 Refs: nodejs#18394 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
MylesBorins commented Aug 7, 2018
Should this be backported to |
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), orvcbuild test(Windows) passesAffected core subsystem(s)
src, vm