You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to make node-osmium work on node 12 and 14. That I'm somewhere with, but now the build breaks on node 6:
../src/buffer_wrap.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE node_osmium::BufferWrap::filter_point_in_time(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/buffer_wrap.cpp:138:146: error: ‘class v8::Maybe<double>’ has no member named ‘ToChecked’
138 | tic_cast<int32_t>(v8::Date::Cast(*info[0])->NumberValue(info.GetIsolate()->GetCurrentContext()).ToChecked() / 1000));
| ^~~~~~~~~
NAN_METHOD(BufferWrap::filter_point_in_time) {
INSTANCE_CHECK(BufferWrap, "Buffer", "filter_point_in_time");
if (info.Length() != 1) {
Nan::ThrowTypeError(Nan::New("please provide a point in time as first and only argument").ToLocalChecked());
return;
}
osmium::Timestamp point_in_time;
if (info[0]->IsInt32()) {
point_in_time = Nan::To<int32_t>(info[0]).ToChecked();
} elseif (info[0]->IsString()) {
Nan::Utf8String time_string { info[0] };
point_in_time = osmium::Timestamp(*time_string);
} elseif (info[0]->IsDate()) {
point_in_time = osmium::Timestamp(static_cast<int32_t>(v8::Date::Cast(*info[0])->NumberValue(info.GetIsolate()->GetCurrentContext()).ToChecked() / 1000));
}
I've upgraded to nan 2.14.1 to ensure #852 is applied, but I'm still getting similar errors to #851 when building with Node 6.
The text was updated successfully, but these errors were encountered:
@matburnham This is happening because they use the V8 methods, not the nan ones, so there’s nothing we can do about it on nan’s side. Can you report this to the node-osmium project instead?
I'm trying to make node-osmium work on node 12 and 14. That I'm somewhere with, but now the build breaks on node 6:
buffer_wrap.cpp#L138:
I've upgraded to nan 2.14.1 to ensure #852 is applied, but I'm still getting similar errors to #851 when building with Node 6.
The text was updated successfully, but these errors were encountered: