Skip to content

os: rename functions wrapped via hideStackFrames() #58159

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LiviaMedeiros
Copy link
Member

The internal hideStackFrames() returns wrapper function with .name === 'wrappedFn' (and .length === 0 which aligns with desired value), and these wrappers are exported directly to userspace. Let's give them more meaningful names.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. os Issues and PRs related to the os subsystem. labels May 4, 2025
Copy link
Member

@anonrig anonrig left a comment

Choose a reason for hiding this comment

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

Please let's run benchmarks before these changes, so we know there aren't any regressions.

const getHostname = getCheckedFunction(_getHostname);
const getInterfaceAddresses = getCheckedFunction(_getInterfaceAddresses);
const getUptime = getCheckedFunction(_getUptime);
const getHomeDirectory = getCheckedFunction(_getHomeDirectory, 'getHomeDirectory');
Copy link
Member

Choose a reason for hiding this comment

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

Can we run benchmarks on these changes?

@anonrig anonrig added the needs-benchmark-ci PR that need a benchmark CI run. label May 4, 2025
Copy link

codecov bot commented May 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.17%. Comparing base (a44ccac) to head (d1f1996).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58159      +/-   ##
==========================================
- Coverage   90.17%   90.17%   -0.01%     
==========================================
  Files         630      630              
  Lines      186503   186506       +3     
  Branches    36618    36615       -3     
==========================================
- Hits       168188   168179       -9     
- Misses      11120    11125       +5     
- Partials     7195     7202       +7     
Files with missing lines Coverage Δ
lib/os.js 98.60% <100.00%> (+0.01%) ⬆️

... and 35 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-benchmark-ci PR that need a benchmark CI run. needs-ci PRs that need a full CI run. os Issues and PRs related to the os subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants