Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

src: remove unused private field #60802

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
targos wants to merge 1 commit into nodejs:main
base: main
Choose a base branch
Loading
from targos:rm-private-unused

Conversation

@targos
Copy link
Member

@targos targos commented Nov 21, 2025

Refs: #59828

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Nov 21, 2025
Copy link
Member Author

targos commented Nov 21, 2025

If there's a good reason to keep it, we should instead put a comment and disable compiler warnings.

juanarbol reacted with thumbs up emoji

Copy link

codecov bot commented Nov 21, 2025
edited
Loading

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.54%. Comparing base (d729bec) to head (35cece7).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@
## main #60802 +/- ##
==========================================
- Coverage 88.55% 88.54% -0.01% 
==========================================
 Files 703 703 
 Lines 208259 208259 
 Branches 40162 40158 -4 
==========================================
- Hits 184415 184400 -15 
- Misses 15844 15887 +43 
+ Partials 8000 7972 -28 
Files with missing lines Coverage Δ
src/node.h 95.91% <ø> (ø)

... and 44 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.

CallbackScope(CallbackScope&&) = delete;

private:
void* resource_storage_global_;
Copy link
Member

@legendecas legendecas Nov 22, 2025
edited
Loading

Choose a reason for hiding this comment

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

This structure is a public API and changing the private fields will change the size of the struct and cause ABI incompatibility.

This field was named as reserved_.

This should be a semver-major change.

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'm ok to keep it if it's reserved for something. Do you have a suggestion for an explaining comment?

Copy link
Member

Choose a reason for hiding this comment

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

Calling it void* reserved_; should be fine without a comment tbh -- this is a pretty common pattern in C/C++ APIs for ABI forward compatibility.

Copy link
Member

@legendecas legendecas Nov 24, 2025

Choose a reason for hiding this comment

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

I think renaming this field to reserved_ could be good. We can also remove this in a semver-major change.

@targos targos added the semver-major PRs that contain breaking changes and should be released in the next major version. label Nov 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@addaleax addaleax addaleax left review comments

@legendecas legendecas legendecas left review comments

@anonrig anonrig anonrig approved these changes

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /