-
-
Notifications
You must be signed in to change notification settings - Fork 815
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
Switch from NAN to N-API #1304
Switch from NAN to N-API #1304
Conversation
Thanks @mohd-akram - this builds and all tests pass for me (I'm using OS X 10.15.3). I notice that travis is not running any of the jobs for mac and linux which is odd - not sure why that is. And of course some electron builds are failing on windows. |
I very much appreciate the progress @mohd-akram has made on this. The N-API Version Matrix from the Node.js documentation shows that N-API version 3, which is the recommended version, is not supported on Node.js versions 4, 5, and 7. Removing those versions from the CI files will eliminate some of the build errors. I'm happy to make these changes, but the process to update another contributor's PR is not clear to me. |
Same here! I was surprised to see my commit show up above (as I was trying to push to my own branch). Anyway, how about we take the unique approach of all working on the same PR here to try to drive this to a quick conclusion?
I'm supportive of this 👍 Please commit this change @jschlight |
@jschlight ping me via email if you need access |
It's really good that we can now have a single code-base to work with. I've been working with this code for the past couple of weeks attempting to understand the test failures reported by Travis CI and AppVeyor. I've been stymied in this effort by some of the test failures not being reproducible. The commit above makes a change to the first two Mocha tests. With the above change, the tests run successfully on my macOS development system under Node v10.20.1. However, they consistently fail under Node v12.16.2. To this point I've been unsuccessful in determining the cause of the error due the limited If we can get a clearer, specific understanding of why this particular test is failing, I can work with other members of the N-API team to help get it resolved. |
I think I've managed to fix the issue. Tests are passing now. Electron versions < 3 fail to build with this error:
|
|
Thanks @jschlight and @mohd-akram! Great progress here! One though I've not seen discussed yet: which electron versions to keep building for. I think if we bump the major version when this is released we should also remove some of the older electron versions. @kewde can you advise which versions must be kept? |
It looks like the builds for the older Electron versions are still failing, but now for new reasons. I've updated the |
We shouldn't define |
Based on the comment above from @mohd-akram, I can now see why the old Electron builds are failing. I downloaded and unpacked https://electronjs.org/headers/v2.0.1/node-v2.0.1.tar.gz. Examining So the move to N-API precludes the use of Electron versions prior to 3.0.0. |
Thank you for the contributions @mohd-akram && @jschlight. With regards to the minimal requirements, we will be deprecating support for any version below:
|
I've reduced the build matrix on the CI to just the required versions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this is now passing on travis, so 👍 from me to merge this.
But let's also get a 👍 review from @kewde as well.
Thanks everyone!
Hmm, this is interesting. We could perhaps add a single job (for each architecture: linux, macos, win32 & win64) to the Travis CI responsible pushing the binary releases. That way we only have to wait for 4 jobs to be completed when pushing a binary release. |
Node v14 should be added to the test matrix. v11 is already EOL, and v13 will be EOL in June. |
Thank you to everyone involved, in particular @jschlight @mohd-akram ! |
@kewde can you consider making @mohd-akram a core contrib + npm publish (if he's up for it) to help reduce your load? It's clear he understands the code base and has made a few major contribs so far. |
👍 agree on adding @mohd-akram, if interested. To make this easiest (@kewde being able to add/encourage more collaborators) I think we should consider moving this repo to its own org outside Mapbox - that way (as the original maintainer) I can give full maintainer-ship to @kewde and he can pass it to others if interested. I can look into getting approval from Mapbox to do that if others are interested. It makes sense to me since no Mapbox employees are actively developing on this module anymore, but it is important to the node community to have it maintained by those who are using it and have ideas to improve it. |
Hi folks. Thank you for considering me for being a core contributor. My initial PR, built on top of the work done by @jschlight, was motivated by getting worker threads working with node-sqlite3 for a project. I'm no longer working on that project, but I do use node-sqlite3 in a few other projects and would be happy to assist. |
Closes #830.