Skip to content

Conversation

@Flarna
Copy link
Member

@Flarna Flarna commented Oct 17, 2025

There is ongoing work to replace async customization hooks by a synchronous variant. As a result bugs/design flaws or the async variant (thread leak, overhead) are not addressed.

Adapt stability index to avoid wrong assumptions they might move to stable.

Refs: nodejs/loaders#201
Refs: nodejs/loaders#198

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. module Issues and PRs related to the module subsystem. labels Oct 17, 2025
@Flarna Flarna force-pushed the loaderhooks-experimental branch 2 times, most recently from 686506b to 31c0694 Compare October 17, 2025 22:53
@Flarna Flarna added the loaders Issues and PRs related to ES module loaders label Oct 17, 2025
@Flarna Flarna force-pushed the loaderhooks-experimental branch 2 times, most recently from df81a7d to f036b18 Compare October 17, 2025 23:02
<!-- type=misc -->
> Stability: 1.2 - Release candidate (asynchronous version)
> Stability: 1 - Experimental (asynchronous version)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any stability level 1.x is experimental. See https://nodejs.org/docs/latest/api/documentation.html#stability-index

We don’t really have a level for “pending removal” so maybe the most appropriate level is the most experimental one:

Suggested change
> Stability: 1 - Experimental (asynchronous version)
> Stability: 1.0 - Early development (asynchronous version)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not early development though

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think deprecated would be the state for pending removal but that seems too early to me.

I selected a similar state/wording as for async_hooks (except the migration hints) because it seems very similar:

  • no 100% replacement as of now
  • works fine for some usecases
  • has flows which can't/are not planned to be fixed
  • high overhead at least in some cases

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was decided that "deprecated" was reserved for stable features:

> Experimental features leave the experimental status typically either by
> graduating to stable, or are removed without a deprecation cycle.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just create a new stage like 1.9 - Pending removal? And we can add a note next to it that the sync hooks are the intended replacement.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If neither 1.2 - Release candidate nor 1.0 - Early Development makes sense, maybe 1.1 - Active development ?

I feel that whether/when to remove it would be a different question due to the existing usage, but it somewhat certain that even if it stays, it would have to have changes in order to be really functional - there are too many quirks right now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that 1.1 - Active development is better than 1.2, but I think just making a new Pending removal stage would be better still. Worst of all would be going to just 1 - Experimental, as that doesn’t provide any guidance. Having a detailed note is good, but there’s tooling built around our docs and so I think it’s better if the most important information (that this is pending removal) is presented in a structured data way that tooling can understand, rather than contained only within a natural English note.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this PR is the right place to change the Stability index content. This can be done in a separate issue if we think this is needed. There are other places which could benefit from this (async_hooks, trace events, wasi).

Additionally I don't want to start the removal discussion as I can't tell if it will ever happen. It's experimental and according to the Stability index it can be removed at any time without a deprecation cycle. Not saying that we should do that but that is what is written there.

Reading the Stability index again it seems 1.1 fits well. While name of 1.1 includes active the detailed text says Experimental features at this stage are nearing minimum viability. which fits. There is no definition of "active" in the sense of PR count/month,...

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina added the tsc-agenda Issues and PRs to discuss during the meetings of the TSC. label Oct 18, 2025
Flarna and others added 2 commits October 18, 2025 17:29
There is ongoing work to replace async customization hooks by a
synchronous variant.
As a result bugs/design flaws or the async variant (thread leak,
overhead) are not addressed.
Adapt stability index to avoid wrong assumptions they might move to
stable.

Refs: nodejs/loaders#201
Refs: nodejs/loaders#198
Co-authored-by: Antoine du Hamel <[email protected]>
@Flarna Flarna force-pushed the loaderhooks-experimental branch from ae4d294 to 1690620 Compare October 18, 2025 15:29
@Flarna Flarna added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Oct 18, 2025
@joyeecheung
Copy link
Member

FWIW #59666 lists some of the existing bugs in the async cutomization hooks that can explain why this is a bit too far from "release candidate" (they are not yet documented as "known caveats", but have existed from v20)

@Flarna
Copy link
Member Author

Flarna commented Oct 20, 2025

@mcollina you added tsc-agenda label at the same time as you approved.
Are the TSC discussions you want to trigger bound to this PR and merge should be postponed?
Or is it about triggering a more generic discussion in TSC about the stability index?

@joyeecheung joyeecheung removed the tsc-agenda Issues and PRs to discuss during the meetings of the TSC. label Oct 22, 2025
@joyeecheung
Copy link
Member

FYI was done at the TSC meeting; remove the tsc-agenda lebel.

@Flarna Flarna added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 22, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 22, 2025
@nodejs-github-bot nodejs-github-bot merged commit a59706f into nodejs:main Oct 22, 2025
19 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in a59706f

@Flarna Flarna deleted the loaderhooks-experimental branch October 22, 2025 17:12
aduh95 pushed a commit that referenced this pull request Oct 23, 2025
There is ongoing work to replace async customization hooks by a
synchronous variant.
As a result bugs/design flaws or the async variant (thread leak,
overhead) are not addressed.
Adapt stability index to avoid wrong assumptions they might move to
stable.

Refs: nodejs/loaders#201
Refs: nodejs/loaders#198
PR-URL: #60302
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. doc Issues and PRs related to the documentations. loaders Issues and PRs related to ES module loaders module Issues and PRs related to the module subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants