Skip to content

doc: clarify the multi REPL example #57759

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

Conversation

dario-piotrowicz
Copy link
Member

clarify the example presented where multiple REPL
instances are run in the same process by:

  • clarifying that they share the same global object (which currently is a bit ambiguous/half implied)
  • making sure that they do share the same global object (via useGlobal set to true)
  • they delete the unix socket if present (so that people running the code twice don't get confused/annoyed that the second time it doesn't properly work)

Fixes #43118

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. repl Issues and PRs related to the REPL subsystem. labels Apr 5, 2025
@dario-piotrowicz
Copy link
Member Author

By the way, also the title of the section doesn't convince me: ### Starting multiple REPL instances against a single running instance, it feels incorrect/ambiguous to me, what does "single instance" mean here?

does it look ok to everyone else? (what about something like ### Starting multiple REPL instances in the same application/### Starting multiple REPL instances in the same process?)

@dario-piotrowicz dario-piotrowicz force-pushed the dario/43118/multi-repl-doc-example branch from 7b993ed to 5fe7a3f Compare April 5, 2025 18:05
@aduh95
Copy link
Contributor

aduh95 commented Apr 5, 2025

I agree the section title is confusing, my vote would go to Starting multiple REPL instances in the same process (assuming that's indeed what was meant by the original title)

@dario-piotrowicz
Copy link
Member Author

I agree the section title is confusing, my vote would go to Starting multiple REPL instances in the same process (assuming that's indeed what was meant by the original title)

The section there does specify:

It is possible to create and run multiple REPL instances against a single running instance of Node.js

So yeah I am pretty sure we're getting the meaning of the title right 🤔

PS: I didn't think of this before but I would also be happy updating the title to something like Starting multiple REPL instances against a single running instance of Node.js although that's getting a bit long 🤔

@aduh95
Copy link
Contributor

aduh95 commented Apr 5, 2025

I don't think we should use against, it's confusing IMO, reading the title alone I thought it was presenting two options: Starting "multiple REPL instances" vs "a single running instance"

@dario-piotrowicz
Copy link
Member Author

dario-piotrowicz commented Apr 5, 2025

I don't think we should use against, it's confusing IMO, reading the title alone I thought it was presenting two options: Starting "multiple REPL instances" vs "a single running instance"

ah, yeah I see your point and completely agree 👍

Ok, I'd say to go with Starting multiple REPL instances in the same process and revisit if someone pushes back 🙂

clarify the example presented where multiple REPL
instances are run in the same process by:
 - making its title unambiguous
 - clarifying that they share the same `global` object
   (which currently is a bit ambiguous/half implied)
 - making sure that they do share the same `global`
   object (via `useGlobal` set to `true`)
 - they delete the unix socket if present
   (so that people running the code twice don't get
    confused/annoyed that the second time it doesn't
    properly work)
@dario-piotrowicz dario-piotrowicz force-pushed the dario/43118/multi-repl-doc-example branch from 5fe7a3f to bd6346c Compare April 5, 2025 19:48
@aduh95
Copy link
Contributor

aduh95 commented Apr 5, 2025

/cc @nodejs/repl

@lpinca lpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 11, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 11, 2025
@nodejs-github-bot nodejs-github-bot merged commit 95b0f9d into nodejs:main Apr 11, 2025
18 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 95b0f9d

@dario-piotrowicz dario-piotrowicz deleted the dario/43118/multi-repl-doc-example branch April 12, 2025 15:49
RafaelGSS pushed a commit that referenced this pull request May 1, 2025
clarify the example presented where multiple REPL
instances are run in the same process by:
 - making its title unambiguous
 - clarifying that they share the same `global` object
   (which currently is a bit ambiguous/half implied)
 - making sure that they do share the same `global`
   object (via `useGlobal` set to `true`)
 - they delete the unix socket if present
   (so that people running the code twice don't get
    confused/annoyed that the second time it doesn't
    properly work)

PR-URL: #57759
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
RafaelGSS pushed a commit that referenced this pull request May 2, 2025
clarify the example presented where multiple REPL
instances are run in the same process by:
 - making its title unambiguous
 - clarifying that they share the same `global` object
   (which currently is a bit ambiguous/half implied)
 - making sure that they do share the same `global`
   object (via `useGlobal` set to `true`)
 - they delete the unix socket if present
   (so that people running the code twice don't get
    confused/annoyed that the second time it doesn't
    properly work)

PR-URL: #57759
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
aduh95 pushed a commit that referenced this pull request May 6, 2025
clarify the example presented where multiple REPL
instances are run in the same process by:
 - making its title unambiguous
 - clarifying that they share the same `global` object
   (which currently is a bit ambiguous/half implied)
 - making sure that they do share the same `global`
   object (via `useGlobal` set to `true`)
 - they delete the unix socket if present
   (so that people running the code twice don't get
    confused/annoyed that the second time it doesn't
    properly work)

PR-URL: #57759
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
aduh95 pushed a commit that referenced this pull request May 6, 2025
clarify the example presented where multiple REPL
instances are run in the same process by:
 - making its title unambiguous
 - clarifying that they share the same `global` object
   (which currently is a bit ambiguous/half implied)
 - making sure that they do share the same `global`
   object (via `useGlobal` set to `true`)
 - they delete the unix socket if present
   (so that people running the code twice don't get
    confused/annoyed that the second time it doesn't
    properly work)

PR-URL: #57759
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
RafaelGSS pushed a commit that referenced this pull request May 14, 2025
clarify the example presented where multiple REPL
instances are run in the same process by:
 - making its title unambiguous
 - clarifying that they share the same `global` object
   (which currently is a bit ambiguous/half implied)
 - making sure that they do share the same `global`
   object (via `useGlobal` set to `true`)
 - they delete the unix socket if present
   (so that people running the code twice don't get
    confused/annoyed that the second time it doesn't
    properly work)

PR-URL: #57759
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
aduh95 pushed a commit that referenced this pull request May 16, 2025
clarify the example presented where multiple REPL
instances are run in the same process by:
 - making its title unambiguous
 - clarifying that they share the same `global` object
   (which currently is a bit ambiguous/half implied)
 - making sure that they do share the same `global`
   object (via `useGlobal` set to `true`)
 - they delete the unix socket if present
   (so that people running the code twice don't get
    confused/annoyed that the second time it doesn't
    properly work)

PR-URL: #57759
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
aduh95 pushed a commit that referenced this pull request May 17, 2025
clarify the example presented where multiple REPL
instances are run in the same process by:
 - making its title unambiguous
 - clarifying that they share the same `global` object
   (which currently is a bit ambiguous/half implied)
 - making sure that they do share the same `global`
   object (via `useGlobal` set to `true`)
 - they delete the unix socket if present
   (so that people running the code twice don't get
    confused/annoyed that the second time it doesn't
    properly work)

PR-URL: #57759
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
aduh95 pushed a commit that referenced this pull request May 17, 2025
clarify the example presented where multiple REPL
instances are run in the same process by:
 - making its title unambiguous
 - clarifying that they share the same `global` object
   (which currently is a bit ambiguous/half implied)
 - making sure that they do share the same `global`
   object (via `useGlobal` set to `true`)
 - they delete the unix socket if present
   (so that people running the code twice don't get
    confused/annoyed that the second time it doesn't
    properly work)

PR-URL: #57759
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
aduh95 pushed a commit that referenced this pull request May 17, 2025
clarify the example presented where multiple REPL
instances are run in the same process by:
 - making its title unambiguous
 - clarifying that they share the same `global` object
   (which currently is a bit ambiguous/half implied)
 - making sure that they do share the same `global`
   object (via `useGlobal` set to `true`)
 - they delete the unix socket if present
   (so that people running the code twice don't get
    confused/annoyed that the second time it doesn't
    properly work)

PR-URL: #57759
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
aduh95 pushed a commit that referenced this pull request May 19, 2025
clarify the example presented where multiple REPL
instances are run in the same process by:
 - making its title unambiguous
 - clarifying that they share the same `global` object
   (which currently is a bit ambiguous/half implied)
 - making sure that they do share the same `global`
   object (via `useGlobal` set to `true`)
 - they delete the unix socket if present
   (so that people running the code twice don't get
    confused/annoyed that the second time it doesn't
    properly work)

PR-URL: #57759
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

node:repl docs code not working (under "Starting multiple REPL instances against a single running instance")
4 participants