Skip to content
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

src: remove util-inl.h from header files #27631

Closed
wants to merge 3 commits into from

Conversation

sam-github
Copy link
Contributor

@sam-github sam-github commented May 9, 2019

Its intended that *-inl.h header files are only included into the src
files that call the inline methods. Explicitly include it into the files
that need it.

Also, declared an unused priv argument for Initialize, so it doesn't warn on signature mismatch.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Related to #27531

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. labels May 9, 2019
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

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

Rubber stamp LGTM

@sam-github
Copy link
Contributor Author

@joyeecheung Can you take a look at this, which I just added?

89d4424

I discovered that according to test_inspector_socket_server.cc, an include of node.h used to make the ContainerOf function from util-inl.h available, so simply removing it from the .h files is likely API breaking. Since its not implicitly/transitively included by node.h anymore, I think it needs to be explicitly included when NODE_WANT_INTERNALS is not defined.

Perhaps I should do the same for env-inl.h?

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@Trott Trott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 12, 2019
Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

LGTM, but needs a rebase.

@sam-github
Copy link
Contributor Author

I'll rebase. It also can't land until I get it working portably, it seems some compiler chains we use handle inlines a bit differently. Once its building clean on all platforms I'll land (but obviously not before).

@nodejs-github-bot
Copy link
Collaborator

Its intended that *-inl.h header files are only included into the src
files that call the inline methods. Explicitly include it into the files
that need it.
@nodejs-github-bot
Copy link
Collaborator

@sam-github
Copy link
Contributor Author

Landed in 1df3080...b6bfc19

@sam-github sam-github closed this May 13, 2019
@sam-github sam-github deleted the remove-util-inl branch May 13, 2019 20:44
sam-github added a commit that referenced this pull request May 13, 2019
PR-URL: #27631
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
sam-github added a commit that referenced this pull request May 13, 2019
PR-URL: #27631
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
sam-github added a commit that referenced this pull request May 13, 2019
Its intended that *-inl.h header files are only included into the src
files that call the inline methods. Explicitly include it into the files
that need it.

PR-URL: #27631
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
targos pushed a commit that referenced this pull request May 14, 2019
PR-URL: #27631
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
targos pushed a commit that referenced this pull request May 14, 2019
PR-URL: #27631
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
targos pushed a commit that referenced this pull request May 14, 2019
Its intended that *-inl.h header files are only included into the src
files that call the inline methods. Explicitly include it into the files
that need it.

PR-URL: #27631
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@BridgeAR BridgeAR mentioned this pull request May 21, 2019
4 tasks
addaleax added a commit to addaleax/node that referenced this pull request May 21, 2019
`node.h` may only include public APIs, which `util-inl.h` is not.
There does not seem to be any reason for including it, so remove it,
because otherwise native addon compilation is broken due to us not
shipping the `util-inl.h` header.

Refs: nodejs#27631
Fixes: nodejs#27803
@sam-github sam-github mentioned this pull request May 21, 2019
addaleax added a commit that referenced this pull request May 21, 2019
`node.h` may only include public APIs, which `util-inl.h` is not.
There does not seem to be any reason for including it, so remove it,
because otherwise native addon compilation is broken due to us not
shipping the `util-inl.h` header.

Refs: #27631
Fixes: #27803

PR-URL: #27804
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
BridgeAR pushed a commit that referenced this pull request May 22, 2019
`node.h` may only include public APIs, which `util-inl.h` is not.
There does not seem to be any reason for including it, so remove it,
because otherwise native addon compilation is broken due to us not
shipping the `util-inl.h` header.

Refs: #27631
Fixes: #27803

PR-URL: #27804
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants