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 — doc: remove `--expose-gc` flag from CLI documentation by dario-piotrowicz · Pull Request #58909 · nodejs/node

Conversation

@dario-piotrowicz

@dario-piotrowicz dario-piotrowicz commented Jun 30, 2025

Copy link
Copy Markdown
Member

The CLI documentation for --expose-gc has been added in #53078

However it's removal was requested in #53078 (comment) (since this is not something users should generally rely on), but the documentation wasn't fully removed from the PR before it landed.

So I believe that the flag being documented might have been an oversight.

Original context: #58878 (comment)


Note: I'm trying to figure out here if --expose-gc should or not be documented in the CLI documentation, and if it should be I would be inclined to also include it in the manpage for consistency 🤔


Note: I wanted to also mention that the flag is also included in the allowed v8 options and the useful v8 options
(meaning that even after removing the cli flag section some references to it, for advanced users, will still be present in the document)

Sorry, something went wrong.

Uh oh!

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

All reactions
@dario-piotrowicz
doc: remove --expose-gc flag from CLI documentation
154d819
@dario-piotrowicz
dario-piotrowicz requested review from jasnell, joyeecheung and juanarbol June 30, 2025 22:24
@nodejs-github-bot nodejs-github-bot added cli Issues and PRs related to the Node.js command-line interface. doc Issues and PRs related to Node.js documentation. labels Jun 30, 2025
@dario-piotrowicz dario-piotrowicz mentioned this pull request Jun 30, 2025
Some CLI options documented in the CLI docs are missing in node manpage #58895
Closed
jakecastelli
jakecastelli approved these changes Jul 1, 2025
View reviewed changes

@jakecastelli jakecastelli left a comment

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.

This one feels similar to the --expose-internals CLI flag which exists but not documented.

We use --expose-internals exclusively in Core for various testing purposes but outside of core development it is not encouraged.

Sorry, something went wrong.

Uh oh!

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

dario-piotrowicz reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@juanarbol

juanarbol commented Jul 3, 2025

Copy link
Copy Markdown
Member

However it's removal was requested in #53078 (comment) (since this is not something users should generally rely on), but the documentation wasn't fully removed from the PR before it landed.

The docs are pretty much the usage at runtime and what is does (the idea behind documenting stuff), which is inherit from V8. I did not introduced the flag per se, I just added it to the CLI available options, I don't think we should remove the documentation, when the documentation is just showing the usage and that it is part of the available CLI options.

I don't think it is the right thing to do, each flag should be documented; but feel free to land this; I'm not blocking anything.

All reactions

Sorry, something went wrong.

Uh oh!

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

@dario-piotrowicz

dario-piotrowicz commented Jul 3, 2025

Copy link
Copy Markdown
Member Author

However it's removal was requested in #53078 (comment) (since this is not something users should generally rely on), but the documentation wasn't fully removed from the PR before it landed.

The docs are pretty much the usage at runtime and what is does (the idea behind documenting stuff), which is inherit from V8. I did not introduced the flag per se, I just added it to the CLI available options, I don't think we should remove the documentation, when the documentation is just showing the usage and that it is part of the available CLI options.

I don't think it is the right thing to do, each flag should be documented; but feel free to land this; I'm not blocking anything.

Hey @juanarbol 🙂

Thanks a lot for chipping in 🙏

I see your point but I also see that we have various v8 flags that are not documented (and some that are) so I do believe that there's unclarity on this 🤔

I think that ideally we should only document the flags that node specifically implements, the V8 flags that it supports should be just listed (as they are here: available v8 options)

And the nodejs docs should simply then refer to the the V8 official documentation regarding the flags that it supports...

The problem being that I can't seem to find any official V8 documentation regarding the supported flags... any idea if there is one? 🫤

All reactions

Sorry, something went wrong.

Uh oh!

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

@juanarbol

juanarbol commented Jul 3, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

The V8 team is not that good documenting flags as well. From my personal experience, I just have to look at this file https://github.com/v8/v8/blob/b5b7de9cc158c9d4dc038841e5935c49e4764d7e/src/flags/flag-definitions.h#L2594

Again, this is not a blocker, but I don't see this adding any actual value but making things a bit more confusing. I know Node.js has a mess w/ node options and CLI options, but removing docs is not the answer IMHO.

However it's removal was requested in #53078 (comment) (since this is not something users should generally rely on), but the documentation wasn't fully removed from the PR before it landed.

The requested removal of the docs was something about V8 I wrote about. Not the CLI entry and usage.

dario-piotrowicz reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@dario-piotrowicz

dario-piotrowicz commented Jul 4, 2025

Copy link
Copy Markdown
Member Author

The V8 team is not that good documenting flags as well. From my personal experience, I just have to look at this file https://github.com/v8/v8/blob/b5b7de9cc158c9d4dc038841e5935c49e4764d7e/src/flags/flag-definitions.h#L2594

I see, that's a useful link to know about, thank you very much 🙏

Again, this is not a blocker, but I don't see this adding any actual value but making things a bit more confusing. I know Node.js has a mess w/ node options and CLI options, but removing docs is not the answer IMHO.

Thanks a lot, I really appreciate the input 🙂 , personally I see the argument both ways, if we think that this is a foot gun and not something people should be using then it makes sense to me that we don't publicly document it, on the other hand if it is something that node provides it does make sense to document that...

I would have hoped for more people to chip in here 😅 , hopefully someone else will tipping the scale in either direction 🤞

All reactions

Sorry, something went wrong.

Uh oh!

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

@HumaneLogic HumaneLogic mentioned this pull request Jul 6, 2025
doc: add more missing environment variables to manpage #58969
Closed
@aduh95

aduh95 commented Nov 8, 2025

Copy link
Copy Markdown
Contributor

Should we move it to https://nodejs.org/api/cli.html#useful-v8-options?

All reactions

Sorry, something went wrong.

Uh oh!

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

@joyeecheung

joyeecheung commented Nov 9, 2025

Copy link
Copy Markdown
Member

I think moving it to the useful V8 options section would be the right move - it's not up to Node.js to decide how it behaves, so it shouldn't be documented like other Node.js options.

FWIW the existing documentation is somewhat misleading - it would make you think that this triggers a blocking GC that's supposed to clean up all remaining unreachable objects, but that's not the case and even has been the cause of some of our flakes. That function only triggers one GC, and one single GC does not guarantee to clean up everything especially when there are weak references or ephemeron pairs in the graph.

All reactions

Sorry, something went wrong.

Uh oh!

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

@jakecastelli

jakecastelli commented Nov 9, 2025

Copy link
Copy Markdown
Member

+1 on Joyee's suggestion

All reactions

Sorry, something went wrong.

Uh oh!

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

@ATMAKURIDHANUSH33102 ATMAKURIDHANUSH33102 mentioned this pull request Nov 26, 2025
docs: add missing CLI options to manpage and cli docs #60857
Closed
aduh95
aduh95 approved these changes May 19, 2026
View reviewed changes

@aduh95 aduh95 left a comment

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.

It's already in Useful V8 Options section:

node/doc/api/cli.md

Line 4255 in 4f4077a

### `--expose-gc`

Sorry, something went wrong.

Uh oh!

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

All reactions
@aduh95 aduh95 added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels May 19, 2026
@nodejs-github-bot nodejs-github-bot added commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. and removed commit-queue PRs queued for automated landing through the Commit Queue. labels May 19, 2026
@nodejs-github-bot

nodejs-github-bot commented May 19, 2026

Copy link
Copy Markdown
Collaborator
Commit Queue failed
- Loading data for nodejs/node/pull/58909
✔  Done loading data for nodejs/node/pull/58909
----------------------------------- PR info ------------------------------------
Title      doc: remove `--expose-gc` flag from CLI documentation (#58909)
Author     Dario Piotrowicz <[email protected]> (@dario-piotrowicz)
Branch     dario-piotrowicz:dario/remove-expose-gc-from-cli -> nodejs:main
Labels     doc, cli, author ready
Commits    1
 - doc: remove `--expose-gc` flag from CLI documentation
Committers 1
 - Dario Piotrowicz <[email protected]>
PR-URL: https://github.com/nodejs/node/pull/58909
Reviewed-By: Jake Yuesong Li <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/58909
Reviewed-By: Jake Yuesong Li <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Mon, 30 Jun 2025 22:24:25 GMT
   ✔  Approvals: 2
   ✔  - Jake Yuesong Li (@jakecastelli): https://github.com/nodejs/node/pull/58909#pullrequestreview-2975252574
   ✔  - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/58909#pullrequestreview-4323953013
   ✔  Last GitHub CI successful
   ℹ  Green GitHub CI is sufficient
--------------------------------------------------------------------------------
   ✔  No git cherry-pick in progress
   ✔  No git am in progress
   ✔  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
✔  origin/main is now up-to-date
- Downloading patch for 58909
From https://github.com/nodejs/node
 * branch                  refs/pull/58909/merge -> FETCH_HEAD
✔  Fetched commits as 4f4077a299f1..154d819b56da
--------------------------------------------------------------------------------
Auto-merging doc/api/cli.md
[main c106c49288] doc: remove `--expose-gc` flag from CLI documentation
 Author: Dario Piotrowicz <[email protected]>
 Date: Mon Jun 30 23:02:40 2025 +0100
 1 file changed, 19 deletions(-)
   ✔  Patches applied
--------------------------------------------------------------------------------
--------------------------------- New Message ----------------------------------
doc: remove `--expose-gc` flag from CLI documentation

PR-URL: #58909
Reviewed-By: Jake Yuesong Li <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>

[main 7fd1141b43] doc: remove --expose-gc flag from CLI documentation
Author: Dario Piotrowicz <[email protected]>
Date: Mon Jun 30 23:02:40 2025 +0100
1 file changed, 19 deletions(-)
✖ 7fd1141b43e8aa6158de6b4785b6e51960a8b4d6
✔ 0:0 no Assisted-by metadata assisted-by-is-trailer
✔ 0:0 no Co-authored-by metadata co-authored-by-is-trailer
✔ 0:0 skipping fixes-url fixes-url
✔ 0:0 blank line after title line-after-title
✔ 0:0 line-lengths are valid line-length
✔ 0:0 metadata is at end of message metadata-end
✔ 1:8 PR-URL is valid. pr-url
✔ 0:0 reviewers are valid reviewers
✖ 0:0 Commit must have a "Signed-off-by" trailer signed-off-by
✔ 0:0 valid subsystems subsystem
✔ 0:0 Title is formatted correctly. title-format
⚠ 0:50 Title should be <= 50 columns. title-length

ℹ Please fix the commit message and try again.
Please manually ammend the commit message, by running
git commit --amend
Once commit message is fixed, finish the landing command running
git node land --continue

https://github.com/nodejs/node/actions/runs/26131088912

All reactions

Sorry, something went wrong.

Uh oh!

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

@trivikr

trivikr commented Jun 22, 2026

Copy link
Copy Markdown
Member

Commit needs to be signed in order to land

✖  0:0      Commit must have a "Signed-off-by" trailer signed-off-by

@dario-piotrowicz Can you sign the commit by running git commit -s --amend --no-edit?
And then run git push --force-with-lease to push it.

jakecastelli reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@aduh95
aduh95 merged commit a8350ac into nodejs:main Aug 5, 2026
12 checks passed

Uh oh!

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

@aduh95

aduh95 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Landed in a8350ac

All reactions

Sorry, something went wrong.

Uh oh!

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

@aduh95 aduh95 mentioned this pull request Aug 5, 2026
doc: update node.1 to fix linter #65053
Merged
nodejs-github-bot pushed a commit that referenced this pull request Aug 5, 2026
@aduh95
doc: update node.1 to fix linter
02f4630
Signed-off-by: Antoine du Hamel <[email protected]>
PR-URL: #65053
Refs: #58909
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
aduh95 pushed a commit that referenced this pull request Aug 13, 2026
@dario-piotrowicz @aduh95
doc: remove --expose-gc flag from CLI documentation
8b4f3c3
PR-URL: #58909
Reviewed-By: Jake Yuesong Li <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 added a commit that referenced this pull request Aug 13, 2026
@aduh95
doc: update node.1 to fix linter
2740376
Signed-off-by: Antoine du Hamel <[email protected]>
PR-URL: #65053
Refs: #58909
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
aduh95 pushed a commit that referenced this pull request Aug 25, 2026
@dario-piotrowicz @aduh95
doc: remove --expose-gc flag from CLI documentation
c321752
PR-URL: #58909
Reviewed-By: Jake Yuesong Li <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
aduh95 added a commit that referenced this pull request Aug 25, 2026
@aduh95
doc: update node.1 to fix linter
0450ab6
Signed-off-by: Antoine du Hamel <[email protected]>
PR-URL: #65053
Refs: #58909
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
@github-actions github-actions Bot mentioned this pull request Aug 25, 2026
2026-08-26, Version 26.8.0 (Current) #65551
Merged
aduh95 pushed a commit that referenced this pull request Aug 27, 2026
@dario-piotrowicz @aduh95
doc: remove --expose-gc flag from CLI documentation
9b2ca70
PR-URL: #58909
Reviewed-By: Jake Yuesong Li <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
@github-actions github-actions Bot mentioned this pull request Sep 7, 2026
2026-09-08, Version 24.21.0 'Krypton' (LTS) #65873
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aduh95 aduh95 aduh95 approved these changes
@jakecastelli jakecastelli jakecastelli approved these changes
@jasnell jasnell Awaiting requested review from jasnell
@joyeecheung joyeecheung Awaiting requested review from joyeecheung
@juanarbol juanarbol Awaiting requested review from juanarbol

Uh oh!

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

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. cli Issues and PRs related to the Node.js command-line interface. commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. doc Issues and PRs related to Node.js documentation.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

7 participants

@dario-piotrowicz @juanarbol @aduh95 @joyeecheung @jakecastelli @nodejs-github-bot @trivikr
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 01402503 — 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.