Coder Social home page Coder Social logo

Comments (14)

ghinks avatar ghinks commented on August 17, 2024 3

I have taken a suggestion from @mhdawson and contacted a friendly at the serialport package and am looking into converting that NAN interfaces to use NAPI. I have exchanged emails with the maintainer and they are a candidate customer.

from package-maintenance.

ralphtheninja avatar ralphtheninja commented on August 17, 2024 2

@gabrielschulhof @mcollina I'm currently working on a n-api implementation of leveldown. Gonna need a few days more before review. I'm guessing accepting such a PR would be quite overwhelming as a maintainer. I prefer to do it myself and maybe instead ask for help/assistance if I run into dragons. As a maintainer it gives me good incentive to learn more about the code base and the c++ side has always been sort of off-limits for me and other maintainers.

from package-maintenance.

mcollina avatar mcollina commented on August 17, 2024

Absolutely, big big +1. This could be a good item in the todo list.

Have you got a list of popular modules that are going to break because of that, and how their maintainers would feel about a rewrite-to-napi PR?

from package-maintenance.

gabrielschulhof avatar gabrielschulhof commented on August 17, 2024

@mcollina nodejs/abi-stable-node#346 (comment)

from package-maintenance.

gabrielschulhof avatar gabrielschulhof commented on August 17, 2024

@mcollina we need to follow through on some of the things we've already ported. leveldown, for example, was ported early on in the N-API design process, so it basically needs to be ported again.

from package-maintenance.

mcollina avatar mcollina commented on August 17, 2024

My main concern is not about doing the work, but rather in asking the maintainer if they would accept such PR. We should not overstep them and help them only if they are ok with it.

from package-maintenance.

mhdawson avatar mhdawson commented on August 17, 2024

+1 to this suggestion as well (full disclosure I have been a supporter/participant of N-API from the start :)).

from package-maintenance.

mogill avatar mogill commented on August 17, 2024

Porting from NAN to N-API is probably not an awareness issue but more of a cost-benefit problem. NAN and N-API are functionally equivalent: unless the module succumbs to NAN code-rot there is no value to investing time porting from NAN to N-API, especially if the port is non-trivial.

Of course NAN modules are already breaking, which leads back to the core issue of this package-maintenance issue: if a module's maintainer already isn't keeping up with functionality issues, the NAN to N-API conversion is, at best, a treadmill. It makes little sense for an unpaid, uninterested package maintainer to spend hours or days learning N-API when N-API experts are already available to help. For those modules awareness of where to get help doing the work is far more valuable than awareness of the tools and details of the work itself.

The fact Node.js' maintainers already support NAN/N-API conversion for some native modules is news to me. What makes a module eligible for support from @nodejs/n-api? Can package maintainers request help? If so, what is that process?

from package-maintenance.

ghinks avatar ghinks commented on August 17, 2024

I think I'm echoing @mcollina and @mhdawson in that we need to identify the modules first. But this is great, I may at last be able to use some of my lost decades of C++ skills again.
Maybe we should just identify the top compiled modules and offer assistance to convert them as previously suggested. It always has to start with diplomacy.

from package-maintenance.

gabrielschulhof avatar gabrielschulhof commented on August 17, 2024

@ghinks we have a list of the biggest hitters in nodejs/abi-stable-node#346 (comment).

from package-maintenance.

ghinks avatar ghinks commented on August 17, 2024

excellent, I took a look at npm time (as it looked easier, and its been a while since I wrote C++, so I wanted easier). I forked and created a branch and migrated it to napi here. It seems to be all working on napi but as we form teams I'm sure we can get better at reviewing the api changes. I'll need help setting it up on travis for all the different OSs. But it is building and passing all the tests on linux on various node versions.
When we have our next meeting I'm sure we can get organized about how to do this efficiently going forwards, like contacting owners etc.

from package-maintenance.

zeke avatar zeke commented on August 17, 2024

Here's a(n outdated) list of top dependents of nan by dependent count: https://github.com/nice-registry/native-modules#readme -- This could be a useful list for prioritizing which modules authors to reach out to.

There was an effort among to native module maintainers a while back to consolidate work into an org: https://github.com/prebuild -- all the discussion around it happened in this issue: prebuild/welcome#1

from package-maintenance.

ghinks avatar ghinks commented on August 17, 2024

I have additional findings which I am going to follow up with the n-api group and the maintainers group. There are some particular findings I have about updating via node-addon-api to replace nan and direct lib uv usage.

from package-maintenance.

jonchurch avatar jonchurch commented on August 17, 2024

There's some really good stuff in this issue, marking as stale? to hopefully get someone to come dust this off.

from package-maintenance.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.