Skip to content
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

LTS policy #145

Closed
vweevers opened this issue May 31, 2019 · 5 comments · Fixed by #163
Closed

LTS policy #145

vweevers opened this issue May 31, 2019 · 5 comments · Fixed by #163
Assignees

Comments

@vweevers
Copy link

Hi :) I noticed that registry-js@1.5.0 dropped prebuilds for node 8 (dbceb16). Node 8 isn't EOL yet, so I'm wondering what your policy is regarding node versions and/or prebuilds, if any?

@shiftkey
Copy link
Member

@vweevers that decision was based on my experiences with supporting keytar, and having to support prebuild targets for three platforms, two different runtimes and two different architectures. That project has gotten out of hand because I've just been adding new platforms, and currently looks like this:

  • Windows - 23 prebuild targets
  • macOS - 13 prebuild targets (x64 only)
  • Linux - 23 prebuild targets

I'm 👍 to revisiting this and formalize something for these projects, so here's some current thoughts...

We leverage nan wherever possible to work with with abstractions that work across multiple versions of Node. Beyond that, I'd like to be able to use newer V8 APIs that won't ever be backported to older versions of Node, like we found in #144, as well as support context aware modules which are only available in Node 10 or later (electron/electron#18397 has more info).

I fear supporting more platforms means more supporting workarounds.

I also want to note that if you try to build this on a platform when a prebuild is not available, it'll fall back to building from source. That's a bit more graceful than completely dropping support, which was never the intent here.

Looking at the upcoming Node release calendar, later this year I can see the situation where I'd potentially have to support 3 LTS releases (two active, one maintenance), the active version, as well as unstable.

You might not count unstable as a channel worth supporting, but it's been a good canary for me to help identify things before they hit an official release (Electron 5 betas helped me get ready for Node 12, for example).

@shiftkey shiftkey self-assigned this May 31, 2019
@vweevers
Copy link
Author

Thanks for the elaborate response. I agree that dropping a prebuild isn't necessarily a breaking change, although it can feel like a breaking change for some users (when they didn't need a working node-gyp setup before and now they do).

FWIW in leveldown we've greatly improved our prebuilds situation by switching to N-API and prebuildify. Now any version of Node and Electron use the same prebuild. I.e. we need only one prebuild per platform (osx / win / linux / ..) rather than runtime. This simplification has also allowed us to focus on other platforms, like Android, ARM and Alpine.

@shiftkey
Copy link
Member

by switching to N-API

N-API is on my list of things to investigate, and I'm glad this was helpful with improving support

@vweevers
Copy link
Author

prebuildify also helped a little bit. Because with prebuildify and its companion node-gyp-build, all prebuilds are included in the npm package. That means there's no download step and users can switch runtimes without rebuilding/reinstalling. For some modules this approach won't be feasible, due to a large number of prebuilds, unless N-API is used ;)

@shiftkey
Copy link
Member

Coming back to this after some time off, and I have no issues with keeping this project in sync with upstream LTS support. I've opened #163 to add this back in, and I'll write some docs in the README to clarify this before closing this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants