-
-
Notifications
You must be signed in to change notification settings - Fork 134
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 support for Node 6.x #109
Comments
I have been working full time on an After the release, we can look at what can be done to support Node.js v6 in a potential semver minor update. It would also involve changing the level of support and publishing new versions for Ideally |
v7.0.0 is out 🚀 It has a lot of critical improvements and fixes; I think we have finally ironed out the kinks. The user facing API changes are backwards-compatible (with deprecation warnings, see #107), so other than the Node.js version issue it should be appropriate for an I'm a week behind my paid work now, so I will have to circle back around to this issue after finishing up the release of the next If you would like to help expedite Node.js v6 support, the best place to start is with a PR to |
When it comes to it, here is how the |
Congrats on the release! I'll have a tinker around in my free time but i'm not sure how helpful I will be with this. It makes a lot of sense to not support Node v6 but a fix for apollo-server would be super sweet! |
While newer versions of Node.js (e.g. 8, 10) have substantial improvements in terms of features and performance, thanks to their rapid updates to the underlying V8 engine, it's not always possible for users to adopt these newer As @andyrichardson mentioned, LTS support is still in place on Node.js 6 for another eight months. It's certainly tempting to consolidate the complexity of version matrixes and test cases involved with supporting multiple Node.js engines, but I think it's important for us as a community to rally behind the Node.js Foundation's LTS schedule (linked above) since it's one of the only published guidelines in the Node.js ecosystem in terms of "what to support and how long?". For example, The Apollo project doesn't publish LTS terms, but we do generally try to provide support in a similar way as npm does (paired with Node.js LTS). We have a lot of users to consider when dropping support for older runtimes and many have to wait until their infrastructure catches up. For example, (shockingly) Amazon only added Node.js 8 support to Lambda in April 2018. This doesn't mean that we're clinging onto old Node.js versions unnecessarily though; Apollo Server dropped support for Node.js 4 the same week that the Node.js Foundation did — so we're certainly eager to move forward ourselves! That said, I'll/we'll investigate a solution for |
Node.js v8 and v10 are out, and are LTS releases. Supporting the last 3 major releases (2 being LTS) is more than reasonable. LTS means if you build something, expect security patches from Node.js to maintain it for a reasonable service life. It doesn't mean every npm package major release for 3 years will support it, or that it's a good idea to start new projects with it in 2.5 years time. Sometimes, people can't be bothered upgrading Node.js because "if it ain't broke". Once they have a hard reason to upgrade, they do. It's not like browser support where we are slaves to the preferences of the public. It's only a very recent thing that the latest Still, stack traces and things are much nicer with native async/await; I'm not super excited to regress. I use |
As someone who has seen the debugging experience evolve from
Definitely not, but you can imagine someone who has deployed a server 2.5 years ago might want to add GraphQL support to it and could be constrained to Node.js 6 for other reasons.
In Node.js terms, Current and LTS are mutually exclusive. Current does not imply LTS, but rather that, if it is even-numbered, it is intended to become Active LTS. (Node.js 9 was also Current but is odd-numbered and was destined for being dropped). Node.js 10 is still subject to non-trivial breaking changes which the Active LTS is not subjected to and doesn't earn this Active title until October 2018 (and then, only if the Node TSC decides it is ready). In terms of considering a safe choice for a production environment, if you're concerned about breaking changes, it's important to look at the Active LTS and not the Current. Under this versioning/grouping scheme, which serious production users should consider, there are only two LTS versions which are not slated (by definition) to receive potentially breaking changes: Node.js 6 and Node.js 8 — the two versions which All that said, your desire to go with the latest and the greatest is certainly your prerogative and the presence of what sound like vulnerabilities in Thanks for your quick response! |
Hey @abernix! I totally understand where you're coming from here, and I certainly agree that it would be ideal to support the full range of engines supported by The Node Foundation. However, my primary concern is actually implementing this correctly, given the nature of the problem we're solving here and the preponderance of subtle variations in the APIs across these versions of node. Between node 6 and 10, there are critical differences in the way the For example, the order in which stream events are emitted under several conditions are different between 6, 8, and 10. Getting this library and As another example, reliably detecting an aborted http request proved to be surprisingly challenging, since no version of My top priority is the program's soundness. This is fairly trivial when just targeting a single version of node, but is much more challenging while supporting for multiple versions. I am completely open to supporting node 6 here – I would really like that, in fact – but I want to do so in a way that behaves correctly in all scenarios, and doesn't compound the existing complexity. Because we interface with both the network and the filesystem, there are a lot of opportunities for nondeterministic behavior and race conditions, which have a habit of hiding from tests, only to break in production. To help find nondeterministic behavior and incorrect assumptions, I run the test suite hundreds of times in a bash while loop, until it either hangs or fails (or takes unreasonably long). It could be the case that 6 and 8 are far more similar to each other than 8 and 10 were, so this might not be as difficult as I described. If anybody wants to take a stab at it, PRs are always welcome! |
As I've had time to think about this a bit more, I realized I could explain the challenge a bit better. The problem is that we depend on parts of the standard library that changed between the different versions of node... it's not that we necessarily need new language features (since we can quite easily transpile our code); rather, the challenge is that we can't specify the versions of the |
I've published |
Just a heads up: I haven't forgot about this, but haven't had the time to revisit it yet. If I can find some time to dig into All in all, I really appreciate the additional clarity on the struggles you encountered above, @mike-marcacci. 🙇 |
apollographql/apollo-server#2054 (comment) Apollo's earlier requirements were the main reason for this issue to remain open. It is unlikely Sorry to anyone who was holding out hope 😅 |
Hi there, first off, thanks for the great project!
The team working on apollo-server are trying to maintain support for Node v6.x (source). According to @evans, updating to the 6.0.0-alpha.1 would break this support.
Are there any plans to maintain compatibility with v6.x LTS releases (which still has 8 months until EOL)?
The text was updated successfully, but these errors were encountered: