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
repl: Default useGlobal to false in CLI REPL.#5703
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
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.
This isn't really needed. You can just inline test() :-)
jasnell commented Mar 15, 2016
Tentatively marking as semver-major due to the change in defaults. |
lance commented Mar 15, 2016
Not sure if this is the place to ask this, but I couldn't find it addressed in CONTRIBUTING.md. Maybe someone on the thread can advise. What's the preferred method for pull request updates? Since I'm rebasing from upstream/master for each of these commits, I have to But what about all of these incremental changes. Since I'm doing a |
cjihrig commented Mar 15, 2016
It doesn't really matter while the PR is being reviewed. Once it is ready to be landed, it will need to be squashed into a single commit (or multiple commits, broken up logically, if it's a big PR). |
Fishrock123 commented Mar 28, 2016
@lance we all force-push to our branches at some point. If you want to do incremental commits and squash later, that is fine. Sometimes I choose one or the other depending on the change. |
lance commented Apr 25, 2016
Ping. Just checking to see if there is anything more that Committers would like to see addressed here - tidying up loose ends. |
7da4fd4 to c7066fbCompareaddaleax commented May 17, 2016
lance commented May 18, 2016
addaleax commented May 18, 2016
@lance I don’t think you need to test the case where |
lance commented May 18, 2016
@addaleax just to be clear, the failure case is when |
addaleax commented May 18, 2016
@lance Eh, yeah, sorry :D I meant |
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.
nit: double indent for statement continuations… or maybe just align the arguments vertically, I think I’d find that easier to read
addaleax commented May 18, 2016
LGTM with nits addressed + pending CI |
addaleax commented May 18, 2016
@lance It might be a good idea to write a quick comment when you update PRs so that everyone can see that you did that. :) CI: https://ci.nodejs.org/job/node-test-commit/3392/ and ping @nodejs/ctc because semver-major |
Fishrock123 commented May 19, 2016
Sorry, perhaps I have forgotten but I'm not particularly clear on what effect this will have. |
lance commented May 19, 2016
@Fishrock123 currently, the CLI defaults |
addaleax commented May 19, 2016
The effect of this is going to be that the context in which Node’s standard REPL evaluates statements is different from the “default” one, in which virtually all other code, including the REPL’s code itself executes. I think the biggest difference would be that changes occurring on the |
cjihrig commented Jun 30, 2016
LGTM if the CI is green. |
lance commented Jun 30, 2016
CI: https://ci.nodejs.org/job/node-test-pull-request/3140/ Yay! I will merge this today. |
Documentation for REPL states that the default value of `useGlobal` is `false`. It makes no distinction between a REPL that is created programmatically, and the one a user is dropped into on the command line by executing `node` with no arguments. This change ensures that the CLI REPL uses a default value of `false`. Fixes: #5659 Ref: #6802 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> PR-URL: #5703
lance commented Jun 30, 2016
Landed in: 15157c3 |
Fishrock123 commented Jun 30, 2016
@cjihrig Should we mark it as non-semver-major? we can always do a revert in |
cjihrig commented Jun 30, 2016
I would mark it as a bug fix for #6802 until proven otherwise. No tests were harmed while landing this PR. |
addaleax commented Jul 1, 2016
Agreed, I’m taking the liberty to remove the |
Documentation for REPL states that the default value of `useGlobal` is `false`. It makes no distinction between a REPL that is created programmatically, and the one a user is dropped into on the command line by executing `node` with no arguments. This change ensures that the CLI REPL uses a default value of `false`. Fixes: #5659 Ref: #6802 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> PR-URL: #5703
Earlier whenever repl was created (`node.exe` with zero parameters), global context was reused. However nodejs/node#5703 fixed it by creating new context for repl. This broke the chakrashim because the context was getting collected immediately. The reason was we were adding the reference of global context to the sandboxed object instead of newly created context. Fixed it by ensuring we add reference to right context. Also contextShim is always initialized when current context was pushed on the scope. However for scenarios like this, we might just create the context and access the objects like global, etc. of that context without going to push scope path. In that case ensure that things are initialized in the new context.
MylesBorins commented Jul 12, 2016
cjihrig commented Jul 12, 2016
I would let it sit on v6 for a little while first. It almost seems too convenient that nothing broke :-) |
15157c3 changed the CLI REPL to default to useGlobal: false by default. This caused the regression seen in nodejs#7788. This commit adds a known issue test while a proper resolution is determined. Refs: nodejs#5703 Refs: nodejs#7788 PR-URL: nodejs#7793 Reviewed-By: Rich Trott <[email protected]>
MylesBorins commented Jul 20, 2016
due to #7788 I'm adding a dont-land label on this for now |
This is a partial revert of 15157c3. This change lead to a regression that broke require() in the CLI REPL, as imported files were evaluated in a different context. Refs: nodejs#5703Fixes: nodejs#7788 PR-URL: nodejs#7795 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
cjihrig commented Jul 21, 2016
This is a partial revert of 15157c3. This change lead to a regression that broke require() in the CLI REPL, as imported files were evaluated in a different context. Refs: #5703Fixes: #7788 PR-URL: #7795 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
MylesBorins commented Aug 30, 2016 • 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.
at this time I'm going to opt to not land these changes in LTS. |
Pull Request check-list
make -j8 test(UNIX) orvcbuild test nosign(Windows) pass withthis change (including linting)?
test (or a benchmark) included?
existing APIs, or introduces new ones)?
Affected core subsystem(s)
repl
Description of change
This addresses #5659. The
documentation for REPL states that the default value of
useGlobalisfalse. It makes no distinction between a REPL that is createdprogrammatically, and the one a user is dropped into on the command line
by executing
nodewith no arguments. This change ensures that the CLIREPL uses a default value of
false.