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

tools: add missing headers #4630

Closed
wants to merge 1 commit into from
Closed

tools: add missing headers #4630

wants to merge 1 commit into from

Conversation

sung-su
Copy link

@sung-su sung-su commented Jan 11, 2016

Two header files were missing when expose the include file.
These headers are used in "node_internals.h".

@silverwind silverwind added the tools Issues and PRs related to the tools directory. label Jan 11, 2016
@rvagg
Copy link
Member

rvagg commented Jan 12, 2016

/cc @nodejs/build

Perhaps we should explore trimming this so we don't have distributed header-bloat.

@sung-su out of interest, what are you needing in node_internals.h that's making you run in to this problem? I'm not sure I've seen a project reading in there.

@sung-su
Copy link
Author

sung-su commented Jan 12, 2016

Currently build is successful without "node_internals.h".
If so, can I remove "node_internals.h" from "install.py"?

@rvagg
Copy link
Member

rvagg commented Jan 13, 2016

node_internals.h is required by node.h which is why I guess it's installed. We probably either need to refactor out the dependency or include the full chain.

@bnoordhuis any thoughts on this?

/cc @nodejs/addon-api

@agnat
Copy link
Contributor

agnat commented Jan 13, 2016

Looks like node_internals.h is included if NODE_WANT_INTERNALS is defined. Since add-ons could define it this PR does the right thing, conservatively.

On the other hand nobody seems to use it. The build would fail and we would have a bug report, right? Also, the name node_internals.h suggests you should not define NODE_WANT_INTERNALS. So, trimming it might be an option, too. Just less conservative...

If we decide to remove the headers I suggest we add something along the lines:

#if defined(BUILDING_NODE_EXTENSION) && defined(NODE_WANT_INTERNALS)
# error node internals are not available in add-ons
#endif

@sung-su
Copy link
Author

sung-su commented Jan 14, 2016

"node_internals.h" header is copied to the "{_prefix}/include/node" by "install.py".
This is provided to 3rd party for use in add-ons.
In my opinion, If the 3rd party user cannot use this header, it should be removed to provides.

@rvagg
Copy link
Member

rvagg commented Jan 14, 2016

Yeah, I'm +1 on removing if we can do so safely, @agnat's error warning is probably a nice addition too. Anyone want to prepare a pull request for this?

The "node_internals.h" is provided to 3rd party for use in add-ons.
But, nobody can use this header. It should be removed to provides.
@jasnell
Copy link
Member

jasnell commented Mar 22, 2016

@sung-su @rvagg ... any updates on this one?

@rvagg rvagg added the semver-major PRs that contain breaking changes and should be released in the next major version. label Mar 22, 2016
@rvagg
Copy link
Member

rvagg commented Mar 22, 2016

Marking semver-major and lgtm, @agnat can you do a quick review and provide an lgtm?

@jasnell
Copy link
Member

jasnell commented Apr 18, 2016

ping @agnat

@agnat
Copy link
Contributor

agnat commented Apr 20, 2016

Hm, ok. That disables the NODE_WANT_INTERNALS facility altogether. Embedders simply include node_internals.h themselves. If that is what we want... I'm ok with it.

Maybe add a comment to drop the whole thing in major+2...

Sorry for the late reply...

@@ -153,7 +153,7 @@ NODE_EXTERN v8::Local<v8::Value> MakeCallback(
} // namespace node

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
#include "node_internals.h"
# error node internals are not available in add-ons
Copy link
Member

Choose a reason for hiding this comment

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

This breaks building node.js itself.

@bnoordhuis
Copy link
Member

Not installing node_internals.h is the right thing to do, adding it in 32478ac was probably an oversight. The change to node.h will end up breaking the build, however.

@Fishrock123
Copy link
Contributor

Is this something we should do in v7 then?

@bnoordhuis
Copy link
Member

I'll close, install.py was fixed by #6913.

@bnoordhuis bnoordhuis closed this Jun 29, 2016
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major PRs that contain breaking changes and should be released in the next major version. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants