-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Add a flag for IOJS to distinguish versioning from NodeJS #1364
Conversation
I don't think this is the right approach because downstream projects like nw.js and atom will report IS_IOJS even when they are not in fact io.js (and may ship subtly incompatible libraries, for example.) As discussed on IRC yesterday, the best approach is to check NODE_MODULE_VERSION if you care about the ABI level, or V8_{MAJOR,MINOR}_VERSION if you want to special-case on the version of V8. The V8 macros are recent additions. Their absence tells you you're running on an old io.js version or node.js v0.10 or v0.12. Maybe you can persuade joyent/node to back-port the commit that added the macros, I know a lot of people have been asking for them. |
Looks like Do projects like |
I'm reasonably sure they float patches from time to time. |
How is this intended to work over the long-term? Node, IOJS, and Atom are all using |
ABI version bumps are infrequent and the projects have NODE_MODULE_VERSION values that are spaced pretty far apart. They shouldn't conflict anytime soon. |
Looking at
|
That atom entry was added retroactively specifically to coincide. io.js started out on 42 nodejs/nan#226 (comment) |
@kkoopa That's pretty much my point. This is already complicated, mostly due to the fact that these preprocessor definitions have multiple meanings.
I wasn't involved in this discussion, so I have no idea what alternatives were covered. Unless there's a transcript I don't see how this is helpful.
It seems like a better approach would be to avoid reusing these macros, so that sane tests like |
http://logs.libuv.org/io.js/2015-04-06#20:07:10.035 Closing as this sort of thing has been suggested before, and the general consensus is it isn't the correct approach. |
Introduce a new flag rather than overloading existing
NODE_
flags. This will make version checks more clear and robust.