Merge pull request #715 from ogoffart/fix_build_node_16

Fix build with node 16
This commit is contained in:
K.J. Valencik 2021-04-27 10:46:54 -04:00 committed by GitHub
commit be85d188fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 5 deletions

View File

@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]
node-version: [10.x, 12.x, 14.x, 16.x]
rust-toolchain: [stable, beta, nightly]
steps:

View File

@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]
node-version: [10.x, 12.x, 14.x, 16.x]
rust-toolchain: [stable, beta, nightly]
steps:

View File

@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]
node-version: [10.x, 12.x, 14.x, 16.x]
rust-toolchain: [stable, beta, nightly]
steps:
@ -31,7 +31,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Use npm v6
if: ${{ matrix.node-version == '15.x' }}
if: ${{ matrix.node-version == '16.x' }}
run: npm install -g npm@6
- name: Install libclang
uses: KyleMayes/install-llvm-action@01144dc97b1e2693196c3056414a44f15180648b

View File

@ -205,6 +205,14 @@ mod build {
.output()
.expect("Failed to run \"node-gyp build\" for neon-sys!");
if !build_output.status.success() {
panic!(
"Failed to run \"node-gyp build\" for neon-sys!\n Out: {}\n Err: {}",
String::from_utf8_lossy(&build_output.stdout),
String::from_utf8_lossy(&build_output.stderr)
);
}
let node_gyp_build_output = String::from_utf8_lossy(&build_output.stderr);
println!(
"cargo:node_arch={}",

View File

@ -332,7 +332,7 @@ extern "C" void Neon_Class_SetClassMap(v8::Isolate *isolate, void *map, Neon_Dro
neon::ClassMapHolder *holder = new neon::ClassMapHolder(map, drop_map);
isolate->SetData(NEON_ISOLATE_SLOT, holder);
// ISSUE(#77): When workers land in node, this will need to be generalized to a per-worker version.
node::AtExit(cleanup_class_map, holder);
node::AtExit(node::GetCurrentEnvironment(isolate->GetCurrentContext()), cleanup_class_map, holder);
}
extern "C" void *Neon_Class_GetCallKernel(void *wrapper) {