nan icon indicating copy to clipboard operation
nan copied to clipboard

Compatibility matrix

Open mcollina opened this issue 10 years ago • 13 comments

As i pointed out in https://github.com/nodejs/io.js/issues/1807, it would be great to have a compatibility matrix regarding which versions of Nan works on what runtimes. Ideally this should be in JSON format, so we can build a module that can automatically check on which version of node/iojs a module compiles (also taking care of dependencies!). We might also include NW.js and electron.

mcollina avatar May 29 '15 14:05 mcollina

Why not just check that a module is using the latest version of nan, since the latest will cover all node versions, and anything other than the latest will not.

sam-github avatar May 29 '15 16:05 sam-github

that's a great way :). It should be fairly easy to write a little script that checks the dependency tree of a module and checks if it can run on the latest node.

The reason I would like to have a matrix is because I ask myself this question: "does this work on x.y.z.? how long this have been broken?". Given that NAN itself will have major releases (breaking stuff!), it might be hardish to upgrade, so knowing that NAN 1.x supports up to iojs 2.x might be helpful for users and developers.

But that will not help solving the issue anyway: they need to update nan.

mcollina avatar May 29 '15 16:05 mcollina

could use https://github.com/rvagg/dnt/ to verify this, I like the idea though but it should probably be automated so we can keep it updated

rvagg avatar May 30 '15 03:05 rvagg

The changelog lists the latest versions of node.js and io.js at time of release. The only caveat is that later releases might still work, but may require the use of newly added wrappers. If there were several releases of node.js or io.js between NAN releases, it means that the older version of NAN worked for those releases.

On at least one occasion, initial introduction of io.js support, this functionality was also backported to some previous minor releases of NAN.

During the node.js 0.11-series, some releases of node did not support building native addons at all, this is noted in the NAN readme. The readme also notes when support for older 0.11-releases was dropped by NAN. During 0.11, we only aimed to support the very latest node release, as NODE_MODULE_VERSION was not updated accordingly.

Node 0.8 and 0.10 have always been supported in each release, unless noted in the changelog or readme, as some releases might have been broken and later fixed in a patch release.

For a long time, there was also intermittent, unofficial support for node 0.6, but this was dropped at some point after it became practically unusable.

kkoopa avatar May 30 '15 12:05 kkoopa

I wrote an automated script to create a compatibility matrix using our test suite and came up with https://github.com/nodejs/nan/wiki/NAN-Compatibility-Table

I think the odd blank spots are mostly transient failures that would disappear if I were to run them again.

Also, we probably need a better way to represent this!

rvagg avatar Jun 01 '15 09:06 rvagg

I'll share my script when I convert my horrible awk output generator into a Node program, it kind of got out of hand ..

rvagg avatar Jun 01 '15 09:06 rvagg

Cool.

kkoopa avatar Jun 01 '15 10:06 kkoopa

That's amazing!

Do you have the data in any processable form? Il giorno lun 1 giu 2015 alle 12:04 Benjamin Byholm < [email protected]> ha scritto:

Cool.

— Reply to this email directly or view it on GitHub https://github.com/nodejs/nan/issues/368#issuecomment-107386361.

mcollina avatar Jun 01 '15 11:06 mcollina

https://gist.github.com/rvagg/116656cfbe134ebc8c3d - that's the output collected from dnt that I'm parsing to produce that table

rvagg avatar Jun 01 '15 11:06 rvagg

AFAICT, unless nan loses support for old node versions (that hasn't been necessary yet, has it?), the matrix looks like it could be restructured as a list of the releases of nan, and which new node versions each nan release adds support for, or perhaps more usefully as a list of node versions, which v8 it uses, and which version of nan is required to support up to that node/v8.

sam-github avatar Jun 01 '15 20:06 sam-github

good point, but how about I go ahead and push this code up, including the full matrix as I've tested it, and then we can find multiple ways to present it, the README might be a good place to put the summary information

rvagg avatar Jun 02 '15 00:06 rvagg

@rvagg can you update the compatibility table please?

nono avatar Oct 20 '15 10:10 nono

What remains undone until we can close this issue?

kkoopa avatar Nov 14 '15 12:11 kkoopa