[WIP] Migrate from Gulp to Fly#965
Conversation
|
This is fantaaaaaaaastic |
|
Btw feel free to ditch the hyphens |
|
Here's screenshot of And a screenshot of running
Since every team has their own naming conventions, I don't want to step on anybody's toes & rename them in a way that makes less sense for the more active contributors. Also edited original post with a todo re: |
|
Lastly, I know that ZEIT prefers It doesn't really add anything except for visual appeal... export async function build(fly) {
await fly.source('src/*.js')...
}
export default async function(fly) {
await fly.start('build')
await fly.watch('...')
} |
|
I prefer |
|
@nkzawa I was playing with this locally. It can definitely be done, but it's a matter of trading dependencies & speed for syntactical preferences. My gut says that opting in to a plugin is the right choice. |
|
@lukeed Is the speed issue because of transpilation ? I think it can be solved since native |
|
@lukeed I'm also in favor of async/await. Generators feels like bit of a magic. |
|
@nkzawa Fly is powered by Bluebird; more specifically, Bluebird's coroutine implementation. This is because it's consistently the fastest Promise/Promise-alternative there is, for now. It's also the most memory efficient -- I spent weeks testing over 40 libraries. It's the clear winner. Right now, the current game plan is reevaluate all benchmarks once Fly isn't meant to be a prime example of what can be done with Node built-ins. Admittedly, it'd be awesome! I love that about most ZEIT products. But the only way Fly can even be considered over Gulp or Grunt is if it's considerably & unequivocally faster. That said, I had a fork with This is why I made We can continue this discussion at a later time (very interested in your feedbacks!) but installing |
|
@lukeed nice. |
|
@arunoda You bet. I'll add it tomorrow. I've updated my todo list with |
|
@nkzawa Fly used to support async/await, mind you, that was before Babel 6. It was slow. So, we removed it prior to 1.0.
Generators feel more lower level, if anything. While I do find async/await better looking than Don't you agree @lukeed? |
|
Would using fast-async change things somehow? |
|
@sedubois Unfortunately, no. You still suffer Babel's 350-600ms boot time, and the end result is still slower & less efficient. Bluebird is hands-down the fastest option. Having the ability to write |
|
Sorry @jbucaran, missed your comment. I think we should just include |
|
Rebased & forced update. PR now includes the Task names were also truncated; eg Stat improvements are the same. PR is still failing because |
|
@lukeed it looks master's CI succeeds. |
|
@nkzawa Ah, I just inspected. Did not realize that Next.js is testing Node Fly only supports |
|
@lukeed But we need to support Node 4 even after that due to legacy reasons. But anyway, we need to support it for at-least until April. |
|
Well, we can definitely relax our requirements for build stuff
On Sun, Feb 5, 2017 at 12:10 AM Arunoda Susiripala ***@***.***> wrote:
@lukeed <https://github.com/lukeed> But we need to support Node 4 even
after that due to legacy reasons.
Some people still might use it.
But anyway, we need to support it for at-least until April.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#965 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAy8YLZViBSXQrJIB8INsJKh1JwSAN8ks5rZVm3gaJpZM4L13SS>
.
|
|
Unless of course you are concerned with Travis stuff for testing the
framework in older versions of Node in general
On Sun, Feb 5, 2017 at 12:11 AM Guillermo Rauch ***@***.***> wrote:
Well, we can definitely relax our requirements for build stuff
On Sun, Feb 5, 2017 at 12:10 AM Arunoda Susiripala <
***@***.***> wrote:
> @lukeed <https://github.com/lukeed> But we need to support Node 4 even
> after that due to legacy reasons.
> Some people still might use it.
>
> But anyway, we need to support it for at-least until April.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#965 (comment)>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AAAy8YLZViBSXQrJIB8INsJKh1JwSAN8ks5rZVm3gaJpZM4L13SS>
> .
>
--
– @rauchg <https://twitter.com/rauchg>
|
|
@rauchg If we could that's nice. If not, we could change the travis build tool to handle Node versions manually. |
|
Up to you guys. Fly originally supported 4.x, but switched to 6.x at the last minute. All we got out of it was a couple spread operators & destructured assignments. |
|
Does that mean it's easy to go back to supporting 4 on Fly? Our rule is
that if Node officially supports a version, we'd like to support it
On Sun, Feb 5, 2017 at 12:16 AM Luke Edwards ***@***.***> wrote:
Up to you guys. Fly originally supported 4.x, but switched to 6.x at the
last minute. All we got out of it was a couple spread operators &
destructured assignments.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#965 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAy8XA8TVTdGbqW7MDMD3SFD9MzTPUMks5rZVsYgaJpZM4L13SS>
.
|
|
Yeah, I'll patch it. I like that rule too; just took a shortcut this time around. cc @jbucaran, this was my hesitation for dropping support for 4. |
| const processName = isWindows ? 'chromedriver.cmd' : 'chromedriver' | ||
| const chromedriver = childProcess.spawn(processName, { stdio: 'inherit' }) | ||
| // We need to do this, otherwise this task's process will keep waiting. | ||
| setTimeout(() => process.exit(0), 2000) |
There was a problem hiding this comment.
As per the comment above, they need to do this to get chromedriver to shut down at the proper time. Ported directly from the gulpfile.
|
@lukeed Right! BTW which 4.x?
|
|
Is there something that could be affecting the runtime of NPM scripts? Travis is now throwing because of a "reserved word" ( Any ideas? |
|
@lukeed Maybe problem with |
|
@timneutkens Grabbed all of the latest~ |
There was a problem hiding this comment.
@lukeed Thanks ❤️ Side note on this: I really like the async/await syntax combined with fly 😍
|
Thanks 😄 Hopefully, one day, I can just drop Fly into native Node 8(?) & it'll just work. Crossing my fingers for massive boost in native Promise performance. 🤞 |
|
@lukeed found a small bug, the binaries are copied over to |
|
@timneutkens Thanks! Fix incoming. |
|
❤️ |
|
@timneutkens Should I delete the |


Fly has finally reached 2.0, which is super lightweight and brings speed(!) and efficient memory usage. Not too long ago, it was mentioned (#435 (comment)) that Next.js may want to migrate towards Fly because of these reasons.
The current
masteris failing during Jest testing. Since I've dealt purely with Gulp → Fly, it will still fail.To Do
fly-esnextbenchtask is currently broken. Once it's been fixed & I see how it's meant to be, I will port that task, too.build-prefetcherwebpack-based task. I am working on a PR forfly-webpackThoughts
Extract the
lintcommand into alinttask; NPM script would then contain:fly lintPossibly change some task names? Using non-hyphenated names would allow for a more consistent & cleaner-looking
flyfile:Does Next.js use the root
.babelrcto run everything?If not, move it to
config/babel.js&webpack.config.jstoconfig/webpack.js.Improvements
prepublishreleasereleaseIf merged, closes #884.