-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
module: self referential modules in repl or -r
#32261
Conversation
-r
-r
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.
Thanks for working on this @dnlup.
-r
-r
-r
-r
@guybedford I added tests and removed the WIP. I hope I am not forgetting any test case. |
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.
Thanks @dnlup - this seems good to me.
//cc @nodejs/modules-active-members
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.
Thanks for making this happen! I feel like this is reaching the limits of inlining the logic though.
I tried to address all your suggestions, could you take another look? |
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.
Thanks for your patience with this & sorry for the late review feedback. :) LGTM!
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.
LGTM!
I have rebased against |
8ae28ff
to
2935f72
Compare
rebased the latest changes from |
Should I keep this PR open? |
It seems like the only barrier to it landing is that CI is failing? |
I'm going on vacation for a week, but can help with bringing this over the finish line when I get back. |
Only the windows build seems to be failing, I don't understand why though, I can't find a specific error message beside the report that the test exited with code |
It's #34163. The GitHub actions UI is not good for searching through the logs. I find it easier to search the raw log: |
Thank you @richardlau |
After rebasing to resolve the conflicts I am getting |
3c0389b
to
8618148
Compare
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.
Just noted one more refactoring here, sorry to be difficult but would just be nice to try keep the arguments primitive for functions where we can.
Otherwise lets get this merged now.
Load self referential modules from the repl and using the preload flag `-r`. In both cases the base path used for resolution is the current `process.cwd()`. Refs: * nodejs#31595
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.
Let's get this landed finally...
Load self referential modules from the repl and using the preload flag `-r`. In both cases the base path used for resolution is the current `process.cwd()`. Also fixes an internal cycle bug in the REPL exports resolution. PR-URL: #32261 Fixes: #31595 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com>
Thank you all for the help with this PR. |
Load self referential modules from the repl and using the preload flag `-r`. In both cases the base path used for resolution is the current `process.cwd()`. Also fixes an internal cycle bug in the REPL exports resolution. PR-URL: #32261 Fixes: #31595 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com>
Load self referential modules from the repl and using the preload flag `-r`. In both cases the base path used for resolution is the current `process.cwd()`. Also fixes an internal cycle bug in the REPL exports resolution. PR-URL: nodejs#32261 Fixes: nodejs#31595 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com>
Load self referential modules from the repl and using the preload flag `-r`. In both cases the base path used for resolution is the current `process.cwd()`. Also fixes an internal cycle bug in the REPL exports resolution. PR-URL: #32261 Backport-PR-URL: #35385 Fixes: #31595 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com>
Load self-referential modules from the repl and using the preload flag
-r
.In both cases, the base path used for resolution is the current
process.cwd()
.Fix #31595
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes