-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Expose napi version as a node-gyp variable #1745
Comments
We discussed in the N-API team meeting today. Jim mentioned that the N-API team (and by that I mean Jim :)) added the concept a Napi-version to |
Is the desired variable
(doesn't have to be |
Yeah |
Maybe something like the following for cross-platform (looks messy because of the needed escaping):
Definitely not opposed to having |
node-pre-gyp and prebuild permit the user to request multiple builds using I think the work we did there does not apply to this situation. |
node-gyp isn't the right place to embed that logic. If node exposes a |
There's an open pull request over at nodejs/node that is this close to landing so I'll go ahead and close out this issue. |
Expose `napi_build_version` to allow `node-gyp` to make it available for building native addons. Fixes: nodejs/node-gyp#1745 Refs: nodejs/abi-stable-node#371 PR-URL: nodejs#27835 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Expose `napi_build_version` to allow `node-gyp` to make it available for building native addons. Fixes: nodejs/node-gyp#1745 Refs: nodejs/abi-stable-node#371 PR-URL: #27835 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Expose `napi_build_version` to allow `node-gyp` to make it available for building native addons. Fixes: nodejs/node-gyp#1745 Refs: nodejs/abi-stable-node#371 PR-URL: #27835 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Expose `napi_build_version` to allow `node-gyp` to make it available for building native addons. Fixes: nodejs/node-gyp#1745 Refs: nodejs/abi-stable-node#371 PR-URL: nodejs#27835 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Expose `napi_build_version` to allow `node-gyp` to make it available for building native addons. Fixes: nodejs/node-gyp#1745 Refs: nodejs/abi-stable-node#371 PR-URL: #27835 Backport-PR-URL: #35266 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
For my module I want to do conditional compilation based on node-gyp feature support.
Unfortunately there's currently no nice way to figure out at node-gyp configuration time which napi version is supported. I'm currently doing this:
But this checks napi support in the host version of nodejs, not in the nodejs build target version.
The text was updated successfully, but these errors were encountered: