-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
[v14.x backport] modules: deprecate module.parent #33533
Conversation
8795a25
to
51e1517
Compare
ping @nodejs/modules-active-members, would appreciate some reviews before landing this in v14.x |
Let me rebase to make the diff more readable! |
This feature does not work when a module is imported using ECMAScript modules specification, therefore it is deprecated. Fixes: nodejs/modules#469 PR-URL: nodejs#32217 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
c51060d
to
c88cca4
Compare
LGTM |
db2d1ca
to
ac41bf0
Compare
This didn't make it to 14.5.0, is there something I can do to help it land in the next semver-minor? |
I'm about to head on vacation but can help bring this over the finish line after I get back in a week |
@nodejs/lts @nodejs/tsc There was a conflict with this file because another deprecation landed first and the deprecation number this PR was planning to use (and what it uses on master). It dawned on me that we might have inconsistent dep numbers across release streams. Is this intentional? Is this what we want to see happen? Happy to just move forward but wanted to flag. |
@nodejs/lts do we have a policy around landing deprecations like this? Should it come in a semver-minor/ |
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.
Looks good in general but I share Myles' confusion about how deprecation numbering is expected to work here. But that may be a larger issue that this backport.
I'm generally in favor of backporting documentation-only deprecations as far back as possible. |
About numbering, my opinion is that we should have consistent numbers across all release lines (equal to the numbers assigned when the commit lands on the |
Did we already release conflicting deprecation numbers? If so, does it make sense to do a renumbering PR to each release line, potentially even dropping the numbers that may be ambiguous now (and having a footnote that they may refer to different deprecations, depending on where they have been seen)? |
I'm kind of surprised the deprecation numbers between 14.x and master got out of sync. Did we land a deprecation in 14.x that didn't land in master first? |
Adding the semver-minor label as per the original PR |
I believe so - #33126 (which was a slightly special case). +1 to skipping numbers for consistency across release lines. I'm also leaning towards @jkrems suggestion of a PR to patch up the recent numbers. I think it would make sense for |
So after looking into it a bit more it seems like the deprecation number issue we are running into is because the original PR assigned a number instead of waiting for the release to assign the number, this is why we have two number assigned. |
Deprecation numbers are supposed to be assigned when the PR lands: https://github.com/nodejs/node/blob/master/doc/guides/releases.md#step-3-update-any-replaceme-and-dep00xx-tags-in-the-docs |
@richardlau that step in the release guide is saying to replace DEP00XX with a deprecation code during the release. The code is not supposed to be assigned until that point |
@MylesBorins it says
We have definitely been assigning the codes directly on the master branch and not at release time, e.g. |
I guess I'm just not up to date on the process changes that have happened. Not a huge deal. Seems like not assigning until release and then updating on master is a good way to ensure codes stay in sync, but understand why we may not want to do that. Don't really have strong feelings here. |
landed in 8795ee5 |
This feature does not work when a module is imported using ECMAScript modules specification, therefore it is deprecated. Fixes: nodejs/modules#469 Backport-PR-URL: #33533 PR-URL: #32217 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This feature does not work when a module is imported using ECMAScript modules specification, therefore it is deprecated. Fixes: nodejs/modules#469 Backport-PR-URL: #33533 PR-URL: #32217 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Backport of #32217
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes