-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
util: fix util.getCallSites plurality #55626
Conversation
Review requested:
|
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.
What about using a safe approach and keep a getCallSite
function emitting a warning to inform users to use getCallSites
instead? We can land it as semver-minor and then in the next release we remove the getCallSite
completely
`util.getCallSite` returns an array of call site objects. Rename the function to reflect that it returns a given count of frames captured as an array of call site object. Renames the first parameter `frames` to be `frameCount` to indicate that it specifies the count of returned call sites.
bae915c
to
1e26b14
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #55626 +/- ##
==========================================
- Coverage 88.43% 88.43% -0.01%
==========================================
Files 654 654
Lines 187718 187725 +7
Branches 36129 36140 +11
==========================================
+ Hits 166010 166012 +2
+ Misses 14948 14942 -6
- Partials 6760 6771 +11
|
### DEP0186: `util.getCallSite` | ||
|
||
<!-- YAML | ||
changes: | ||
- version: REPLACEME | ||
pr-url: https://github.com/nodejs/node/pull/55626 | ||
description: Runtime deprecation. | ||
--> | ||
|
||
Type: Runtime | ||
|
||
The `util.getCallSite` API has been removed. Please use [`util.getCallSites()`][] instead. |
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.
Doesn't this have to be doc deprecated first?
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 is an API in active development status, not stable yet. I don't think it is necessary to document deprecated.
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.
We should not deprecate experimental APIs, deprecation is for stable features we want to phase out.
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.
There were deprecation for experimental APIs like https://github.com/nodejs/node/blob/main/doc/api/deprecations.md#dep0173-the-assertcalltracker-class.
I was hesistant about adding a deprecation code for this. But all our toolings like expectWarning
expects a deprecation code.
The
notable-change
Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section. |
Co-authored-by: Aviv Keller <[email protected]>
Landed in 68dc15e |
`util.getCallSite` returns an array of call site objects. Rename the function to reflect that it returns a given count of frames captured as an array of call site object. Renames the first parameter `frames` to be `frameCount` to indicate that it specifies the count of returned call sites. PR-URL: nodejs#55626 Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
`util.getCallSite` returns an array of call site objects. Rename the function to reflect that it returns a given count of frames captured as an array of call site object. Renames the first parameter `frames` to be `frameCount` to indicate that it specifies the count of returned call sites. PR-URL: #55626 Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) #55732 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) #55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) #55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) #55626 PR-URL: TODO
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) #55732 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) #55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) #55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) #55626 PR-URL: #55921
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) #55732 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) #55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) #55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) #55626 PR-URL: #55921
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) nodejs#55732 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) nodejs#55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) nodejs#55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) nodejs#55626 PR-URL: nodejs#1
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) nodejs#55732 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) nodejs#55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) nodejs#55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) nodejs#55626 PR-URL: nodejs#1
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) nodejs#55732 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) nodejs#55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) nodejs#55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) nodejs#55626 PR-URL: nodejs#1
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) nodejs#55732 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) nodejs#55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) nodejs#55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) nodejs#55626 PR-URL: nodejs#1
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) nodejs#55732 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) nodejs#55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) nodejs#55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) nodejs#55626 PR-URL: nodejs#1
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) nodejs#55732 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) nodejs#55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) nodejs#55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) nodejs#55626 PR-URL: https://github.com/nodejs/aduh95/pull/1
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) nodejs#55732 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) nodejs#55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) nodejs#55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) nodejs#55626 PR-URL: #1
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) nodejs#55732 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) nodejs#55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) nodejs#55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) nodejs#55626 PR-URL: #1
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) nodejs#55732 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) nodejs#55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) nodejs#55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) nodejs#55626 PR-URL: #1
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) nodejs#55732 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) nodejs#55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) nodejs#55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) nodejs#55626 PR-URL: #1
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) nodejs#55732 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) nodejs#55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) nodejs#55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) nodejs#55626 PR-URL: #1
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) nodejs#55732 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) nodejs#55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) nodejs#55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) nodejs#55626 PR-URL: #1
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) #55732 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) #55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) #55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) #55626 PR-URL: #55921
`util.getCallSite` returns an array of call site objects. Rename the function to reflect that it returns a given count of frames captured as an array of call site object. Renames the first parameter `frames` to be `frameCount` to indicate that it specifies the count of returned call sites. PR-URL: nodejs#55626 Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) nodejs#55732 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) nodejs#55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) nodejs#55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) nodejs#55626 PR-URL: nodejs#55921
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) nodejs#55732 sqlite: * (SEMVER-MINOR) add support for SQLite Session Extension (Bart Louwers) nodejs#54181 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) nodejs#55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) nodejs#55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) nodejs#55626 PR-URL: TODO
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) nodejs#55732 sqlite: * (SEMVER-MINOR) add support for SQLite Session Extension (Bart Louwers) nodejs#54181 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) nodejs#55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) nodejs#55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) nodejs#55626 PR-URL: TODO
Notable changes: doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) nodejs#55732 src: * (SEMVER-MINOR) add cli option to preserve env vars on dr (Rafael Gonzaga) nodejs#55697 util: * (SEMVER-MINOR) add sourcemap support to getCallSites (Marco Ippolito) nodejs#55589 * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) nodejs#55626 PR-URL: nodejs#55921
`util.getCallSite` returns an array of call site objects. Rename the function to reflect that it returns a given count of frames captured as an array of call site object. Renames the first parameter `frames` to be `frameCount` to indicate that it specifies the count of returned call sites. PR-URL: #55626 Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
`util.getCallSite` returns an array of call site objects. Rename the function to reflect that it returns a given count of frames captured as an array of call site object. Renames the first parameter `frames` to be `frameCount` to indicate that it specifies the count of returned call sites. PR-URL: #55626 Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
`util.getCallSite` returns an array of call site objects. Rename the function to reflect that it returns a given count of frames captured as an array of call site object. Renames the first parameter `frames` to be `frameCount` to indicate that it specifies the count of returned call sites. PR-URL: #55626 Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
Notable changes: assert: * (SEMVER-MINOR) make assertion_error use Myers diff algorithm (Giovanni Bucci) #54862 buffer: * (SEMVER-MINOR) make Buffer work with resizable ArrayBuffer (James M Snell) #55377 crypto: * update root certificates to NSS 3.104 (Richard Lau) #55681 doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) #55732 * add jazelly to collaborators (Jason Zhang) #55531 esm: * mark import attributes and JSON module as stable (Nicolò Ribaudo) #55333 http: * (SEMVER-MINOR) add diagnostic channel `http.client.request.created` (Marco Ippolito) #55586 lib: * (SEMVER-MINOR) add UV_UDP_REUSEPORT for udp (theanarkh) #55403 module: * (SEMVER-MINOR) unflag --experimental-require-module (Joyee Cheung) #55085 net: * (SEMVER-MINOR) add UV_TCP_REUSEPORT for tcp (theanarkh) #55408 sqlite: * (SEMVER-MINOR) add support for SQLite Session Extension (Bart Louwers) #54181 tools: * fix root certificate updater (Richard Lau) #55681 util: * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) #55626 PR-URL: TODO
Notable changes: assert: * (SEMVER-MINOR) make assertion_error use Myers diff algorithm (Giovanni Bucci) #54862 buffer: * (SEMVER-MINOR) make Buffer work with resizable ArrayBuffer (James M Snell) #55377 crypto: * update root certificates to NSS 3.104 (Richard Lau) #55681 doc: * enforce strict policy to semver-major releases (Rafael Gonzaga) #55732 * add jazelly to collaborators (Jason Zhang) #55531 esm: * mark import attributes and JSON module as stable (Nicolò Ribaudo) #55333 http: * (SEMVER-MINOR) add diagnostic channel `http.client.request.created` (Marco Ippolito) #55586 lib: * (SEMVER-MINOR) add UV_UDP_REUSEPORT for udp (theanarkh) #55403 module: * (SEMVER-MINOR) unflag --experimental-require-module (Joyee Cheung) #55085 net: * (SEMVER-MINOR) add UV_TCP_REUSEPORT for tcp (theanarkh) #55408 sqlite: * (SEMVER-MINOR) add support for SQLite Session Extension (Bart Louwers) #54181 tools: * fix root certificate updater (Richard Lau) #55681 util: * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) #55626 PR-URL: #56040
util.getCallSite
returns an array of call site objects. Rename thefunction to reflect that it returns a given count of frames captured
as an array of call site object.
Renames the first parameter
frames
to beframeCount
to indicatethat it specifies the count of returned call sites.
Given that this function is marked as "active development", I believe it is better to rename it early.