gulpjs/gulp

Backport graceful-fs update to Gulp 3

demurgos opened this issue · 4 comments

There is a Node issue reporting that Gulp 3 may not work properly with the upcoming Node 10 release. This is caused by the dependency on graceful-fs@3 because it monkey-patches some internal modules.
gulp@4 does not have this issue because it uses graceful-fs@4.

I haven't tried to reproduce the issue yet. According to the Node issue, they were able to patch a package (natives) to fix the problem but this solution may not be reliable.

Would it be possible to issue a patch update to gulp@3 to use graceful-fs@4? Is it a breaking change? Hard to implement?
An alternative would be to recommend the usage of gulp@4 (using engines.node?).

That's a semver breaking change. We're not doing anything about their issue.

FYI This has been fixed already - the natives module used by graceful-fs has updated so we won't be breaking on node 10.

Thanks, I've read that it was fixed but it's only temporary according to this comment:

@addaleax has stated that natives is not a viable long-term solution, with a lifespan better measured in months than years. If I were gulp, I'd look into upgrading.

I suppose it means that it may break again in Node 11 or 12. But yes, it's already fixed in Gulp. graceful-fs explained that their changes tend to have large impacts and @phated confirmed that it's a breaking change. It just means that people may need to upgrade Gulp in the future to use the latest versions of Node: it's not that bad.

I suppose it means that it may break again in Node 11 or 12

Or in Node 10. Node 10 will be supported until 2021 (it's LTS) but you can't count on natives working for that long.

(In fact, you can probably count on it not working for that long.)

A way forward for gulp@3 is to back-port the amazing-graceful-fs changes from graceful-fs@4 to graceful-fs@3. I wrote amazing-graceful-fs, I'm willing to help review.