-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
src: add NODE_MODULE_VERSION registry #24114
Conversation
Having some data structure intersection with https://nodejs.org/dist/index.json might be a good idea in order to make parsing a bit less cumbersome? |
Any suggestions on that @nicolasnoble? index.json has Cross-referencing the two files would be a matter of filtering by |
Yes, I'm basically just suggesting a rename so that the same kind of tooling can be used to parse both files :-) |
What I miss here is some more information about where a specific variant is maintained to get the full diff. Maybe the names used in |
@Flarna I would hope that over time the commit log would begin to show who owns what, if you're reserving a number then you're likely going to have a commit to do it. Do we need to surface additional metadata in the file itself? What would be the use-case for that? |
As a native addon developer I have to decide if I want to support these variants. A change in module version can be any sort of change (not just ABI) and may need also adaptions in other modules like NAN. I'm not sure if we can expect that variant vendors take care to adapt also NAN so this will be left as exercise for addon developers. To actually do this adaptions it's needed to know all details of the difference. But not all variants are of interest for everyone. There are several criterias like e.g.:
|
Thanks for CC @rvagg . NW.js keeps tracks of the Node version it used in https://nwjs.io/versions.json . I can certainly help update the registry file in Node. |
@Flarna right, so this is mostly about making this more informative for addon authors. I get that, but I'm wondering if that's best achieved in this file or maybe in a matching .md file that can be more freeform. I'll have a play with extending this file and see if I can keep mess to a minimum in the process. |
@rogerwang I might ping you again if/when this lands so you can PR an update. I'm not sure if I can make a 1:1 matching of Node version to NODE_MODULE_VERSION since you're also using -pre versions. So it might be best if you do a separate PR against the file to get those versions recorded properly. |
@rvagg I don't care much about the format here so moving the details into an .md file is also fine - as long as they stay in sync. |
it's the sync problems I'm most concerned about, already node_version.h is out of sync and it's all in one file! |
43f9d8c
to
9adf1fb
Compare
Updated this to reserve 68 which is in use now for nightlies
TODO here is:
I think the obvious step in getting there for now is to just bump this whole structure down one level so more information can be introduced at the top level and this information could potentially be archived if we ever arrived at a full replacement. Something like this: |
9cc162e
to
e1813d4
Compare
added 69 for Electron 4 and 70 for Electron 5 per discussion in nodejs/TSC#651 |
1e79d79
to
e292539
Compare
This is ready to land (IMO), could I get some reviews please? If you disagree with what's in this PR please make that clear. Latest changes:
So this is now designed to be extended into the future, it'll support:
|
Electron 4.0.4 changed its NVM from 64 to 69. There has been debate over if this constituted an ABI breaking change or a fix, and if this was relevant in a patch release or in a major release. See the mentions in electron/electron#16687 and the discussion in electron/node@8bc5d17 It might be worth discussing this here also in order to provide clarification and guidance in the documentation. |
@nicolasnoble it did come up in nodejs/TSC#651 and the reservation of 69 was as a result of that discussion. It's less than ideal for addon authors and consumers in Electron but Electron has additional problems with ABI stability that it might need to monitor more carefully into the future. Having this as a place to register as many new numbers as they need should help resolve concerns about bumping more liberally. I've made changes to be more specific about Electron versions (5da2462): - { "modules": 69, "runtime": "electron", "variant": "electron", "versions": "4" },
+ { "modules": 69, "runtime": "electron", "variant": "electron", "versions": "^4.0.5" }, and - { "modules": 64, "runtime": "electron", "variant": "electron", "versions": "3" },
+ { "modules": 64, "runtime": "electron", "variant": "electron", "versions": ">=3 <4.0.5" }, |
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.
Thanks, @rvagg!
The change happened between 4.0.3 and 4.0.4, so your patch here is a little bit off. |
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.
LGTM once @vsemozhetbyt comments are added.
Can you state in the BUILDING file that changing the In other words, a module built for |
Suggestions all adopted, I think this is ready for landing and I'll do that tomorrow unless there objections. @murgatroid99 to your point: that's covered fairly comprehensively in doc/releases.md under the heading "Also consider whether to bump |
5da2462
to
72aaacc
Compare
Landed in c61c722 |
PR-URL: #24114 Refs: https://nodejs.org/en/download/releases/ Refs: https://github.com/lgeiger/node-abi/blob/master/index.js Refs: nodejs/TSC#621 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]>
Ref: https://nodejs.org/en/download/releases/
Ref: https://github.com/lgeiger/node-abi/blob/master/index.js
Ref: nodejs/TSC#621
As per nodejs/TSC#621, here's a suggestion for how we keep track of these values as they spiral out of control. Already the comments in node_version.h is out of date and the suggested means of "reserving" a value by opening an issue at nodejs/TSC is going to be difficult to track.
I've collected the values as best as I can. Partly from our own history but also @lgeiger's node-abi package and a bit of digging. I couldn't figure out how NW.js stores
NODE_MODULE_VERSION
so can't update their values (maybe @rogerwang can help?).Versions are all node-semver range compliant. The V8 increments are pinned to the precise pre-release version they'd compile as if you did it raw (won't match nightly versions unfortunately).
Thoughts?
/cc @nodejs/addon-api @nodejs/v8 @kapouer