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 — Deprecate domains by tellnes · Pull Request #75 · nodejs/node

Conversation

@tellnes

@tellnes tellnes commented Dec 5, 2014

Copy link
Copy Markdown
Contributor

ref #66

Also, I did notice that domain.dispose() is deprecated but missing a deprecation message. So it includes a commit which fixes it. Please inform me if you want it as a separate pull request.

I've also changed two test assertions. I belive usage of domain in lib/repl.js was swallowing the assert errors and that those are currently broken.

Sorry, something went wrong.

Uh oh!

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

All reactions
@tellnes tellnes mentioned this pull request Dec 5, 2014
deprecate domains #66
Closed
bnoordhuis
bnoordhuis reviewed Dec 5, 2014
View reviewed changes
Comment thread lib/domain.js

@bnoordhuis bnoordhuis Dec 5, 2014

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.

Is this the advice we want to give?

Sorry, something went wrong.

Uh oh!

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

All reactions

@tellnes tellnes Dec 5, 2014

Copy link
Copy Markdown
Contributor Author

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.

It is copied directly from the documentation in doc/api/domain.markdown (d86814a)

Sorry, something went wrong.

Uh oh!

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

All reactions

@bnoordhuis bnoordhuis Dec 5, 2014

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.

Ah, good catch. Can you amend the commit log to mention that?

EDIT: On a general note, commit logs should explain what changed and why. One-liners are almost never sufficient.

Sorry, something went wrong.

Uh oh!

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

All reactions

@tellnes tellnes Dec 5, 2014

Copy link
Copy Markdown
Contributor Author

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've added some more info to the commit message.

Sorry, something went wrong.

Uh oh!

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

All reactions
@tellnes
tellnes force-pushed the domain branch 2 times, most recently from 53ed3ec to 6805268 Compare December 5, 2014 21:40
@bnoordhuis

bnoordhuis commented Dec 5, 2014

Copy link
Copy Markdown
Member

The PR mostly LGTM. The commit logs could perhaps still use some love and it would be good to have closure on the failing test but the basic approach seems sound.

I'd like to get one more LGTM. @chrisdickinson or @cjihrig Can one of you take a look?

All reactions

Sorry, something went wrong.

Uh oh!

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

othiym23
othiym23 reviewed Dec 5, 2014
View reviewed changes
Comment thread lib/repl.js Outdated

@othiym23 othiym23 Dec 5, 2014

Copy link
Copy Markdown
Contributor

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 thought that tracing.createAsyncListener() was going away as part of @trevnorris's work on removing the JS-side AsyncListener API. Am I incorrect?

Sorry, something went wrong.

Uh oh!

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

All reactions

@tellnes tellnes Dec 6, 2014

Copy link
Copy Markdown
Contributor Author

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.

In that case, what is the correct api to use?

Sorry, something went wrong.

Uh oh!

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

All reactions

@othiym23 othiym23 Dec 6, 2014

Copy link
Copy Markdown
Contributor

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.

The safest thing would be to stick with domains for now, perhaps with a workaround to allow the REPL to use them without printing a deprecation warning. If you felt ambitious, you might build a lightweight layer atop the C++ AsyncWrap implementation (which will still be exposed via process.binding). But since domains are just getting deprecated, not removed, it's fine to still be using them in core, in my opinion. @trevnorris, do you have thoughts on this?

Sorry, something went wrong.

Uh oh!

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

All reactions

@tellnes tellnes Dec 6, 2014

Copy link
Copy Markdown
Contributor Author

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.

What about some code for the repl in process._fatalException in src/node.js?

Alternatively we can just listen to uncaughtException. This functionality is about not breaking the repl when there is an uncaughtException and instead just displaying the error to the user.

Sorry, something went wrong.

Uh oh!

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

All reactions

@othiym23 othiym23 Dec 6, 2014

Copy link
Copy Markdown
Contributor

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 would lean more towards using process._fatalException than uncaughtException, because the latter is built on the former anyway. I'm sure a decent top-level error handler could be built atop _fatalException alone, but, out of curiosity: why not just leave the domains code in the REPL for now? It works fine in the repl, the domains code will still be there for a while, and as far as I know, many people near to core are still committed to the idea of coming up with an improved async error-handling solution for Node in the not too distant future.

Sorry, something went wrong.

Uh oh!

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

All reactions

@tellnes tellnes Dec 6, 2014

Copy link
Copy Markdown
Contributor Author

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.

All the domain code is still in the REPL. I've just changed it to only use domains if the user provides one (which is possible, but undocumented). It does not fallback to calling domain.create() which trigger the deprecation warning.

Sorry, something went wrong.

Uh oh!

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

All reactions

@tellnes tellnes Dec 6, 2014

Copy link
Copy Markdown
Contributor Author

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.

Actually, how it is implemented now makes the REPL catch all uncaught exceptions. Maybe that should be possible to change with an option and be disabled by default if you are using the REPL as a library.

I think this is getting out of scope for this pull request. Maybe it should be addressed in its own? But it needs to be addressed before the deprecation can be merged.

Sorry, something went wrong.

Uh oh!

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

All reactions
@tellnes

tellnes commented Dec 6, 2014

Copy link
Copy Markdown
Contributor Author

About the test I've changed.

After some digging I've found out it actually was broken by 7afdba6.

I've changed the test to look like the following code. This fails on the current v0.12 branch which proves the error was swallowed.

testMe.complete('toSt', function(error, data) {
  try {
    assert.deepEqual(data, [['toString'], 'toSt']);
  } catch (err) {
    console.log('error');
    process.exit(1);
    return;
  }
  console.log('ok');
});
All reactions

Sorry, something went wrong.

Uh oh!

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

chrisdickinson
chrisdickinson reviewed Dec 6, 2014
View reviewed changes
Comment thread lib/repl.js Outdated

@chrisdickinson chrisdickinson Dec 6, 2014

Copy link
Copy Markdown
Contributor

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 is just me being paranoid, but could we use .once here?

Sorry, something went wrong.

Uh oh!

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

All reactions

@tellnes tellnes Dec 6, 2014

Copy link
Copy Markdown
Contributor Author

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.

Sure, but shouldn't that be guaranteed by the api that the exit code is only fired once? If not, there probably a lot of broken code out there.

Sorry, something went wrong.

Uh oh!

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

All reactions

@bnoordhuis bnoordhuis Dec 7, 2014

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.

One reason to prefer .once() over .on() is that the former lets the function's closure object get garbage collected before the EventEmitter object is collected.

Sorry, something went wrong.

Uh oh!

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

All reactions

@tellnes tellnes Dec 7, 2014

Copy link
Copy Markdown
Contributor Author

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.

Ok, I'll change it.

Sorry, something went wrong.

Uh oh!

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

All reactions
@tellnes
tellnes force-pushed the domain branch from 6805268 to 68326b9 Compare December 7, 2014 16:49
@tellnes

tellnes commented Dec 7, 2014

Copy link
Copy Markdown
Contributor Author

Ok. I've removed the REPL changes and just fixed it so it doesn't shows a deprecation warning. I think the REPL issues should be addressed on its own.

I'll wait until @trevnorris or some one else comments on the usage of tracing.createAsyncListener() before I'd do something more about the REPL.

All reactions

Sorry, something went wrong.

Uh oh!

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

@caineio caineio added needs info and removed needs info labels Dec 8, 2014
@caineio

caineio commented Dec 8, 2014

Copy link
Copy Markdown

Hello!

I am pleased to see your valuable contribution to this project. Would you
please mind answering a couple of questions to help me classify this submission
and/or gather required information for the core team members?

Questions:

  1. Which part of core do you think it might be related to?
    One of: debugger, http, assert, buffer, child_process, cluster, crypto, dgram, dns, domain, events, fs, http, https, module, net, os, path, querystring, readline, repl, smalloc, stream, timers, tls, url, util, vm, zlib, c++, docs, other (label)
  2. Which versions of io.js do you think are affected by this?
    One of: v0.10, v0.12, v1.0.0 (label)
  3. PR-only Does make test pass after applying this Pull Request.
    Expected: yes
  4. PR-only Is the commit message properly formatted? (See
    CONTRIBUTING.md for more information)
    Expected: yes

Please provide the answers in an ordered list like this:

  1. Answer for the first question
  2. Answer for the second question
  3. ...

Note that I am just a bot with a limited human-reply parsing abilities,
so please be very careful with numbers and don't skip the questions!

In case of success I will say: ...summoning the core team devs!.

In case of validation problem I will say: Sorry, but something is not right here:.

Truly yours,
Caine.

Responsibilities

  1. indutny: crypto, tls, https, child_process, c++
  2. trevnorris: buffer, http, https, smalloc
  3. bnoordhuis: http, cluster, child_process, dgram
All reactions

Sorry, something went wrong.

Uh oh!

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

@tellnes

tellnes commented Dec 8, 2014

Copy link
Copy Markdown
Contributor Author
  1. domain
  2. v0.12
  3. yes
  4. yes
All reactions

Sorry, something went wrong.

Uh oh!

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

@caineio

caineio commented Dec 8, 2014

Copy link
Copy Markdown

...summoning the core team devs!

All reactions

Sorry, something went wrong.

Uh oh!

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

@caineio caineio added v0.12 domain Issues and PRs related to the domain subsystem. and removed need info labels Dec 8, 2014
@bnoordhuis bnoordhuis added this to the v1.0.0 milestone Dec 9, 2014
@bnoordhuis

bnoordhuis commented Dec 9, 2014

Copy link
Copy Markdown
Member

Ping @chrisdickinson, @cjihrig and @trevnorris. I'll bring this up in the TC meeting tomorrow and I'm assigning it to the v1.0.0 milestone so that we will have to make a decision before the first release.

All reactions

Sorry, something went wrong.

Uh oh!

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

cjihrig
cjihrig reviewed Dec 9, 2014
View reviewed changes
Comment thread test/simple/test-repl-no-deprecation-messages.js Outdated

@cjihrig cjihrig Dec 9, 2014

Copy link
Copy Markdown
Contributor

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.

You can just fail here and remove the child.on('exit', ...);

Sorry, something went wrong.

Uh oh!

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

All reactions
@cjihrig

cjihrig commented Dec 9, 2014

Copy link
Copy Markdown
Contributor

This LGTM besides one nit.

I'm in favor of deprecating domains, but has an replacement been discussed? For example, I've heard of (but not looked into whatsoever) StrongLoop's zones. Or, is the idea going forward not to have a replacement?

All reactions

Sorry, something went wrong.

Uh oh!

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

@tellnes
domain: add deprecation message for domain.dispose
7a6ceb7
Deprecated in d86814a without a
deprecation message.

Deprecation message copied from documentation.
@Tatsujinichi Tatsujinichi mentioned this pull request Nov 12, 2019
spawnSync shell command, error cut: -: Bad file descriptor nodejs/help#2284
Closed
@CTimmerman CTimmerman mentioned this pull request Jan 10, 2020
incomplete stack #31297
Closed
@joyeecheung joyeecheung mentioned this pull request Feb 20, 2020
repl: printing big strings results in OOM #25478
Closed
@snyk-bot snyk-bot mentioned this pull request May 5, 2020
[Snyk] Upgrade remark-preset-lint-node from 1.13.0 to 1.15.0 137717unity/node#4
Open
@wmertens wmertens mentioned this pull request Jun 19, 2020
uv__io_stop: Assertion `loop->watchers[w->fd] == w' failed. #33966
Closed
targos added a commit to targos/node that referenced this pull request Apr 27, 2021
@targos
deps: V8: cherry-pick 3066b7b2fcb3
022356d
Original commit message:

    [LTS-M86][compiler][x64] Fix bug in InstructionSelector::ChangeInt32ToInt64

    (cherry picked from commit 02f84c745fc0cae5927a66dc4a3e81334e8f60a6)

    No-Try: true
    No-Presubmit: true
    No-Tree-Checks: true
    Bug: chromium:1196683
    Change-Id: Ib4ea738b47b64edc81450583be4c80a41698c3d1
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2820971
    Commit-Queue: Georg Neis <[email protected]>
    Reviewed-by: Nico Hartmann <[email protected]>
    Cr-Original-Commit-Position: refs/heads/master@{#73903}
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2821959
    Commit-Queue: Jana Grill <[email protected]>
    Reviewed-by: Georg Neis <[email protected]>
    Reviewed-by: Victor-Gabriel Savu <[email protected]>
    Cr-Commit-Position: refs/branch-heads/8.6@{nodejs#75}
    Cr-Branched-From: a64aed2333abf49e494d2a5ce24bbd14fff19f60-refs/heads/8.6.395@{#1}
    Cr-Branched-From: a626bc036236c9bf92ac7b87dc40c9e538b087e3-refs/heads/master@{#69472}

Refs: v8/v8@3066b7b
targos added a commit that referenced this pull request Apr 30, 2021
@targos
deps: V8: cherry-pick 3066b7b2fcb3
9bfb0f3
Original commit message:

    [LTS-M86][compiler][x64] Fix bug in InstructionSelector::ChangeInt32ToInt64

    (cherry picked from commit 02f84c745fc0cae5927a66dc4a3e81334e8f60a6)

    No-Try: true
    No-Presubmit: true
    No-Tree-Checks: true
    Bug: chromium:1196683
    Change-Id: Ib4ea738b47b64edc81450583be4c80a41698c3d1
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2820971
    Commit-Queue: Georg Neis <[email protected]>
    Reviewed-by: Nico Hartmann <[email protected]>
    Cr-Original-Commit-Position: refs/heads/master@{#73903}
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2821959
    Commit-Queue: Jana Grill <[email protected]>
    Reviewed-by: Georg Neis <[email protected]>
    Reviewed-by: Victor-Gabriel Savu <[email protected]>
    Cr-Commit-Position: refs/branch-heads/8.6@{#75}
    Cr-Branched-From: a64aed2333abf49e494d2a5ce24bbd14fff19f60-refs/heads/8.6.395@{#1}
    Cr-Branched-From: a626bc036236c9bf92ac7b87dc40c9e538b087e3-refs/heads/master@{#69472}

Refs: v8/v8@3066b7b

PR-URL: #38275
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Shelley Vohr <[email protected]>
@snyk-bot snyk-bot mentioned this pull request Sep 1, 2021
[Snyk] Security upgrade libnpx from 9.7.1 to 10.0.0 KamilPolivka/node#19
Open
This was referenced Sep 13, 2021
[Snyk] Fix for 1 vulnerabilities solebox/node#24
Open
[Snyk] Fix for 1 vulnerabilities erdun/node#39
Open
[Snyk] Fix for 1 vulnerabilities enterstudio/node#23
Open
[Snyk] Fix for 1 vulnerabilities s4sc/node#23
Open
@solebox solebox mentioned this pull request May 13, 2022
[Snyk] Fix for 1 vulnerabilities solebox/node#29
Open
@enterstudio enterstudio mentioned this pull request May 14, 2022
[Snyk] Fix for 1 vulnerabilities enterstudio/node#28
Open
@s4sc s4sc mentioned this pull request May 14, 2022
[Snyk] Fix for 1 vulnerabilities s4sc/node#28
Open
@snyk-bot snyk-bot mentioned this pull request Jan 8, 2023
[Snyk] Upgrade @humanwhocodes/config-array from 0.9.5 to 0.11.8 AshdonG/node#3
Open
@Bhanditz Bhanditz mentioned this pull request Nov 26, 2023
[Snyk] Fix for 2 vulnerabilities Bhanditz/node#34
Open
@bumplzz69 bumplzz69 mentioned this pull request Nov 26, 2023
[Snyk] Fix for 2 vulnerabilities bumplzz69/node#54
Open
@RoeeOren RoeeOren mentioned this pull request Nov 27, 2023
[Snyk] Fix for 2 vulnerabilities RoeeOren/node#41
Open
@Verdinjoshua26 Verdinjoshua26 mentioned this pull request Nov 27, 2023
[Snyk] Fix for 1 vulnerabilities Verdinjoshua26/node#49
Open
@Matthelonianxl Matthelonianxl mentioned this pull request Nov 27, 2023
[Snyk] Fix for 1 vulnerabilities Matthelonianxl/node#56
Open
@sirinartk sirinartk mentioned this pull request Nov 28, 2023
[Snyk] Fix for 1 vulnerabilities sirinartk/node#46
Open
@timzwit timzwit mentioned this pull request Nov 28, 2023
[Snyk] Fix for 2 vulnerabilities timzwit/node#30
Open
@vaibhavb vaibhavb mentioned this pull request Nov 28, 2023
[Snyk] Fix for 2 vulnerabilities vaibhavb/node#43
Open
@awaisab172 awaisab172 mentioned this pull request Nov 29, 2023
[Snyk] Fix for 1 vulnerabilities awaisab172/node#49
Open
@ajesse11x ajesse11x mentioned this pull request Nov 29, 2023
[Snyk] Fix for 2 vulnerabilities ajesse11x/node#44
Open
This was referenced Dec 1, 2023
[Snyk] Security upgrade pkg from 4.3.4 to 4.4.3 MaxMood96/node#38
Open
[Snyk] Security upgrade pkg from 4.3.4 to 4.4.3 Mement-Mori/node#33
Open
Pranay180420 pushed a commit to Pranay180420/Node.jsforme that referenced this pull request Feb 17, 2025
@bnoordhuis
build: expand ~ in install prefix early
0bb099f
The install prefix gets written to config.gypi and config.mk.  Tildes
were expanded in the first file but not in the second one, causing the
`make install` target to install files to a directory named `~` in
the current working directory.

Fixes: nodejs/node#75
PR-URL: nodejs/node#2307
Reviewed-By: Johan Bergström <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

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

Assignees

No one assigned

Labels

domain Issues and PRs related to the domain subsystem.

Projects

None yet

Milestone

1.0.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

8 participants

@tellnes @bnoordhuis @caineio @cjihrig @trevnorris @rvagg @chrisdickinson @othiym23
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.