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

chore: add missing callback to gulp sequences #11205

Merged

Conversation

ncoden
Copy link
Contributor

@ncoden ncoden commented Apr 25, 2018

Description

As gulp sequences don't return a stream, a callback must be called when its callback job is done.

Bug was introduced in #11119

Types of changes

  • Documentation
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing
    functionality to change)

Checklist (all required):

  • I have read and follow the CONTRIBUTING document.
  • There are no other pull request similar to this one.
  • The pull request title is descriptive.
  • The template is fully and correctly filled.
  • The pull request targets the right branch (develop or support/*).
  • My commits are correctly titled and contain all relevant information.
  • My code follows the code style of this project.
  • I have updated the documentation accordingly to my changes (if relevant).
  • I have added tests to cover my changes (if relevant).
  • All new and existing tests passed.

As gulp sequences don't return a stream, a callback must be called when its callback job is done.

Bug was introduced in foundation#11119
@ncoden
Copy link
Contributor Author

ncoden commented Apr 28, 2018

@DanielRuf Could you review this when you have some time ?

@DanielRuf
Copy link
Contributor

Hm, I see different implementations like on('end'), on('finish') and pipe(done).

@ncoden
Copy link
Contributor Author

ncoden commented Apr 28, 2018

Hmm pipe(done) is actually a commit mistake.
According to https://stackoverflow.com/a/41003102/4317384 only on('finish') should be used

@ncoden ncoden added this to the 6.5.0 milestone Apr 29, 2018
`pipe(done)` is a mistake and pipe does not work that way.
`on('end')` may not be triggered because `end` is an interval stream event that does not reflect the whole gulp stream operation. Only `finish` should be used to wait for the operation end.

See: https://stackoverflow.com/a/41003102/4317384
@ncoden
Copy link
Contributor Author

ncoden commented Apr 29, 2018

Hm, I see different implementations like on('end'), on('finish') and pipe(done).

@DanielRuf fixed:

  • 1facce0 fix: wait for gulp tasks ends with the finish event

@ncoden ncoden merged commit e6aba29 into foundation:develop Apr 29, 2018
ncoden added a commit to ncoden/foundation-sites that referenced this pull request Jun 16, 2018
…sequence-callbacks for v6.5.0

4bcabc1 chore: add missing callback to gulp sequences
1facce0 fix: wait for gulp tasks ends with the `finish` event

Signed-off-by: Nicolas Coden <nicolas@ncoden.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants