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 include in node.h #27804

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Member

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

@BridgeAR It would be awesome if you could push out 12.3.1 with that soon, it completely breaks non-N-API addon compilation.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

`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
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label May 21, 2019
@addaleax addaleax added the fast-track PRs that do not need to wait for 48 hours to land. label May 21, 2019
@addaleax
Copy link
Member Author

Please 👍 this comment to approve fast-tracking.

@nodejs-github-bot
Copy link
Collaborator

@targos
Copy link
Member

targos commented May 21, 2019

How is it that CITGM couldn't catch this?

@BridgeAR
Copy link
Member

@addaleax I'll try to put together a patch release tomorrow.

@addaleax
Copy link
Member Author

@targos I think CITGM uses --nodedir? That points node-gyp to a full Node.js source tree, so all headers are present there. This definitely isn’t the first time we’ve had this kind of issue. It’s not really trivial to solve, as far as I can tell, mostly because node-gyp is trying to be Helpful™ and refuses to build against non-release versions without --nodedir and/or requires a tarball even when all relevant headers are installed globally.

@targos
Copy link
Member

targos commented May 21, 2019

@addaleax could we for example, from citgm, copy the public headers to a temporary directory and point --nodedir to it?

@addaleax
Copy link
Member Author

@targos Yeah, I assume there is some way to make something like that work…

@addaleax
Copy link
Member Author

Landed in 47c5c3d

@addaleax addaleax closed this May 21, 2019
@addaleax addaleax deleted the addons-fix branch May 21, 2019 21:31
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
Copy link
Member

Thinking about this further: would it maybe be possible to do something like that directly in each CI run instead of in our CITGM runs?

@richardlau
Copy link
Member

Yes, it's possible. There was #12231 which stalled.

@sam-github
Copy link
Contributor

It would be good to get #12231 going again. I added the broken includes because some test/cctest code was failing to build, code that included only (I thought at the time) "node.h", leading me to the wrong conclusion that those headers were expected as part of the node API. Building addon tests like actual addons would be very helpful.

@targos Sorry for the trouble, and thanks for doing a fixup release.

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>
@BridgeAR BridgeAR mentioned this pull request May 22, 2019
BridgeAR added a commit that referenced this pull request May 22, 2019
Notable changes

* deps:
  * Fix handling of +0/-0 when constant field tracking is enabled
    (Michaël Zasso) #27792
  * Fix `os.freemem()` and `os.totalmem` correctness (cjihrig)
    #27718
* src:
  * Fix v12.3.0 regression that prevents native addons from compiling
    #27804

PR-URL: #27814
BridgeAR added a commit to BridgeAR/node that referenced this pull request May 22, 2019
Notable changes

* deps:
  * Fix handling of +0/-0 when constant field tracking is enabled
    (Michaël Zasso) nodejs#27792
  * Fix `os.freemem()` and `os.totalmem` correctness (cjihrig)
    nodejs#27718
* src:
  * Fix v12.3.0 regression that prevents native addons from compiling
    nodejs#27804

PR-URL: nodejs#27814
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. fast-track PRs that do not need to wait for 48 hours to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

util-inl.h missing
8 participants