doc: add note about ABI compatibility#22237
doc: add note about ABI compatibility#22237MylesBorins wants to merge 1 commit intonodejs:masterfrom
Conversation
|
cc @nodejs/delivery-channels |
doc/releases.md
Outdated
There was a problem hiding this comment.
We should probably strongly encourage people who do this to contact us, so that we have consistent NODE_MODULE_VERSION values between distributors?
There was a problem hiding this comment.
So qq, I wasn't sure the answer to, can we support NODE_MODULE_VERSION to have characters in it or does gyp assume it is a number?
There was a problem hiding this comment.
I'm curious if this is something we could actually detect during build so that the build can actually fail if the NODE_MODULE_VERSION is not bumped.
There was a problem hiding this comment.
@MylesBorins The value is programatically accessible to addons, so changing its type would be a breaking change by itself.
@jasnell We might be able detect mismatching dependency versions, but not every API version change also means that the ABI has changed (or vice versa)
There was a problem hiding this comment.
I guess the implication of this is we'll need to maintain a list of NODE_MODULE_VERSION. Do we have anything other than
Lines 74 to 114 in dcfd323
|
@MylesBorins Likely not the right place, this file seems to be targeted at NodeJS upstream maintainer responsible for doing releases. Maybe https://github.com/nodejs/node/blob/master/BUILDING.md would be a better place? Also I would then advocate to specify in each release which version of each library was used for this release. Those are information that can be retrieved by looking at the commit history of the |
doc/releases.md
Outdated
There was a problem hiding this comment.
Micro-nit: Remove *Note*: here and in the paragraph above. Just say what you have to say.
doc/releases.md
Outdated
There was a problem hiding this comment.
Nit: Semver Major -> semver major for consistency.
I dislike the term semver major because I think it's jargon that we understand but that not everyone should be expected to. However, I don't have a better alternative. Suggestions welcome, although it's certainly outside the scope of this PR. It's been bugging me for a long time.
There was a problem hiding this comment.
I think just within a major version is fine?
maclover7
left a comment
There was a problem hiding this comment.
LGTM with nits addressed
For stuff that we've built and released on https://nodejs.org, the versions of the dependencies are recorded in https://nodejs.org/dist/index.json and https://nodejs.org/dist/index.tab. |
|
I've addressed all above nits and moved the note into Thoughts? |
BUILDING.md
Outdated
There was a problem hiding this comment.
consult with the TSC may seem a bit vague to someone unfamiliar with our organization. Maybe explicitly suggest them to open an issue in https://github.com/nodejs/tsc/issues ? (Also it's likely to be request to join @nodejs/delivery-channels)
There was a problem hiding this comment.
I think in line with the above suggestion for reversed bits we could ask that the PR themselves into the list of reserved values for those bits.
BUILDING.md
Outdated
There was a problem hiding this comment.
I think we should flesh out a bit more what is involved in a custom NODE_MODULE_VERSION. The problem is that we don't necessarily have "room" in the incrementally increasing versions to anticipate needs apriori.
My proposal is:
- Reserve 8 most significant bits in the
NODE_MODULE_VERSIONfor 'distribution'. - Official builds would use 0. Electron, and other distributors could use a different value if the binary they are shipping is not ABI compatible.
There was a problem hiding this comment.
reserving a number of bits makes sense to me.
There was a problem hiding this comment.
+1. Does someone want to push a commit that adds this specific documentation?
There was a problem hiding this comment.
@ofrobots would you be able to supply explicit copy for this? Otherwise I'd like to land this in an iteration of this PR
|
just chiming in to say this would be pretty useful for electron. right now people get confused and think that their module should work because it has the right NODE_MODULE_VERSION, but in fact it was built against a non-Electron set of headers. It'd be great if we could use a different NMV to make it really clear that building against stock headers won't work. |
|
This seems a bit vague to me, you're essentially saying "any dependency needs to be the same version, no matter what", but I only understand exactly one dependency to actually be public ABI, that being openssl due to exporting openssl symbols to binary node_modules. Could this be a little more specific so that distro packagers can actually know what they're dealing with? For example we build with icu 62, even on nodejs-lts-carbon which vendors icu 60. Is this too, to be considered public ABI? e.g.:
P.S. This is a statement being made about whether or not ABI compatibility is maintained, and this does, apparently, require the same versions of dependencies. Stating that it is "expected" is a rather soft way of describing a technological requirement that has no ambiguity. Either there is ABI compatibility or there is not. Saying that you don't expect ABI compatibility implies you think there is a slim chance that there might accidentally be ABI compatibility anyway. |
|
Ping |
|
I need to review this and update based on comments. Will try and do so later today. If anyone else wants to take lead and push a commit please feel free to do so |
f9dd79c to
e47d5c6
Compare
|
updated, will land in 48 hours if there are no objections |
|
The technical connotations i mentioned of expected vs. required have been clarified sufficiently IMO. You still don't enumerate what the publicly exported dependencies in question are, though. Are there any, other than openssl? |
e47d5c6 to
c22f25b
Compare
Building node against versions of the dependencies that differ from the ones we vendor will result in a non ABI compatible version of Node.js This patch adds a note to make it explicit that if individuals build node against different versions of a dependency they should make a custom NODE_MODULE_VERSION.
c22f25b to
97b6139
Compare
|
/cc @nodejs/platform-aix is this a known failure? I'm going to land this anyways as it is a doc fix unrelated to the failures but wanted to raise this |
|
Landed in 97d9ccd |
Building node against versions of the dependencies that differ from the ones we vendor will result in a non ABI compatible version of Node.js This patch adds a note to make it explicit that if individuals build node against different versions of a dependency they should make a custom NODE_MODULE_VERSION. PR-URL: #22237 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
I don't believe it's a known failure. I've opened #23962 to look into it. |
Building node against versions of the dependencies that differ from the ones we vendor will result in a non ABI compatible version of Node.js This patch adds a note to make it explicit that if individuals build node against different versions of a dependency they should make a custom NODE_MODULE_VERSION. PR-URL: #22237 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Building node against versions of the dependencies that differ from the ones we vendor will result in a non ABI compatible version of Node.js This patch adds a note to make it explicit that if individuals build node against different versions of a dependency they should make a custom NODE_MODULE_VERSION. PR-URL: #22237 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Building node against versions of the dependencies that differ from the ones we vendor will result in a non ABI compatible version of Node.js This patch adds a note to make it explicit that if individuals build node against different versions of a dependency they should make a custom NODE_MODULE_VERSION. PR-URL: #22237 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Building node against versions of the dependencies that differ from the ones we vendor will result in a non ABI compatible version of Node.js This patch adds a note to make it explicit that if individuals build node against different versions of a dependency they should make a custom NODE_MODULE_VERSION. PR-URL: #22237 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Building node against versions of the dependencies that differ from the ones we vendor will result in a non ABI compatible version of Node.js This patch adds a note to make it explicit that if individuals build node against different versions of a dependency they should make a custom NODE_MODULE_VERSION. PR-URL: #22237 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Building node against versions of the dependencies that differ from the ones we vendor will result in a non ABI compatible version of Node.js This patch adds a note to make it explicit that if individuals build node against different versions of a dependency they should make a custom NODE_MODULE_VERSION. PR-URL: #22237 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Building node against versions of the dependencies that differ from the
ones we vendor will result in a non ABI compatible version of Node.js
This patch adds a note to make it explicit that if individuals build
node against different versions of a dependency they should make a
custom NODE_MODULE_VERSION.