module: doc-deprecate module.register()#62395
module: doc-deprecate module.register()#62395GeoffreyBooth wants to merge 1 commit intonodejs:mainfrom
module.register()#62395Conversation
|
Review requested:
|
JakobJingleheimer
left a comment
There was a problem hiding this comment.
In general I support this, but we had previously discussed providing the tools to facilitate in userland. Matteo opened a PR to donate the requisite machina, but that's stalled.
I'm a little fuzzy on when that part should be available. I'm thinking it should be available when the depreciation is announced.
da047b8 to
aa218be
Compare
|
Joyee FtW 🙌 For a doc depreciation, I think it's fine. But for a runtime depreciation, I think a replacement solution or requisite pieces need to be available in Core first 😬 |
aa218be to
3fd4551
Compare
3fd4551 to
1af6d44
Compare
There was a problem hiding this comment.
I think it would be more prudent to promote module.registerHooks as stable before marking this as deprecated. Otherwise, there will be no single API that is stable to register a module loader, and a broadly used API is going to be deprecated.
We should encourage people to migrate from a widely-used experimental API to a stable API, rather than another still-technically-experimental API.
Right now, module.registerHooks is still at Release Candidate.
1af6d44 to
d153a03
Compare
|
@legendecas I defer to the consensus of the group, but what I was thinking was:
The doc-deprecation sooner than later is to start preparing the users for the shift. Aligning it with the 26 release maximizes visibility. And |
I think this is what concerns me. The migration takes time and work. Asking library maintainers to migrate should not be taken for granted, not mentioning asking them to migrate to an API that is not stable yet. If we believe it is time for library owners to migrate, we should promote Also /cc @nodejs/import-in-the-middle-maintainers, as import-in-the-middle is still using |
Yes, so shouldn’t we give them as much warning as possible? And if they start migrating to |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #62395 +/- ##
==========================================
- Coverage 89.69% 89.68% -0.02%
==========================================
Files 676 676
Lines 206693 206693
Branches 39577 39584 +7
==========================================
- Hits 185402 185379 -23
- Misses 13435 13447 +12
- Partials 7856 7867 +11 🚀 New features to boost your workflow:
|
|
I'm not arguing if What I'm arguing is that we should promote |
Can we doc-deprecate Also we think Also I don’t see why |
|
I'd be happy to +1 if the @nodejs/loaders team has consensus on this plan. But I'd also like to defer the runtime deprecation of |
|
While I sympathize @legendecas's concerns, I think making Note that this PR only doc-deprecates it. When discussing with @GeoffreyBooth, our rough ideas was like this:
This means between now until September/October (when 26 goes LTS), we should have even more feedback from migrators to gain more confidence about whether |
FWIW I think the loaders team as an orchestration is like most other informal FYI teams now - many of the recent loader-related changes (e.g. clearCache, VFS) are happening orthogonally to the loader team's roadmap, and AFAICT the loader team meeting has been inactive for some time. A consensus from the loaders team would be like consensus from the performance team - might be useful if it's obtainable, but since it's not consistently coordinated by anyone as a proper venue/owner, it's not more meaningful than the general consensus from collaborators who show up for a PR. |
Sounds good to me! Appreciate all the explainations! |
This PR doc-deprecates
module.register()in favor ofmodule.registerHooks().In discussion with @joyeecheung we were thinking of landing this now so it can go out in 25 and 26, and then a runtime deprecation can go out in 26. cc @nodejs/loaders @nodejs/releasers
The
module.registerHooksAPI is nearing stability; at the very least it’s already much more stable thanmodule.register, and lacks the unresolvable issues that plaguedmodule.register.