Closed gabrielcsapo closed 4 years ago
@gabrielcsapo Could you create a small repo with steps to reproduce?
Closing this issue as there hasn't been any movement on it for the last week. Feel free to reopen if you are able to create the reproduction steps.
FWIW, this is a legit feature request and something that @stefanpenner and I have discussed and planned on doing for quite a while (roughly since he implemented the cancelation code for Broccoli 2.0).
Steps to repro:
1) Have a large build pipeline that takes a few seconds 2) change a file (kicks off a rebuild) 3) change another file during that rebuild
Expected result:
.build
method immediately after step 3 (essentially short circuiting the build) and start overActual result:
Broccoli should stop calling any node's .build method immediately after step 3 (essentially short circuiting the build) and start over
More specifically, it should continue the current build, and skip the next.
The code for this is actually largely implemented, but I believe requires the watcher be connected to the builder, to close the loop. Now that @oligriffiths and @thoov work landed, that should be quite easy to do.
cc @thoov maybe we can quickly look at that later today/tomorrow.
I have a working PR here https://github.com/broccolijs/broccoli/pull/408 that should do exactly what was talked about in this thread. Thanks for explaining @rwjblue and @stefanpenner
@gabrielcsapo thanks for the PR. I don’t think that gets us far enough. The Builder cancellation functionality needs updating first. Will work on a fix for this.
When a funnel is being built, if a command to build again has been issued again, the funnel should stop its build and rebuild.