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

When you trigger an error in the sass task the watcher gets stuck. #26

Closed
gijsroge opened this issue Sep 30, 2019 · 6 comments
Closed
Labels
bug Something isn't working

Comments

@gijsroge
Copy link
Member

If you have an error you in your sass files the build throws an error but does not recompile after you fix the issue.

This forces you too re trigger the watch task each time you make a mistake.

Not sure whats causing this.

@MartijnCuppens
Copy link
Contributor

Hmm, I can't reproduce that. Could you scope where things go wrong?

@gijsroge
Copy link
Member Author

@MartijnCuppens yeah I was planning on debugging it. Just created an issue so I can keep track of the progress.

@gijsroge
Copy link
Member Author

I've setup a repo where you can reproduce the issues.

Just run the buildozer watch command and uncomment https://github.com/gijsroge/plumber-sass-watch-issue/blob/master/scss/subfolder/_test.scss#L3

It only happens if you import a file from a subfolder that triggers an error .. 🤷‍♂️

Found a couple of related issues.
floatdrop/gulp-plumber#34
floatdrop/gulp-plumber#30
floatdrop/gulp-plumber#42

The quick fix is to implement a custom errorHandler that emits an 'end' event.
floatdrop/gulp-plumber#30 (comment)

Looks like we have 2 options available.
Either we apply the quick fix
Or we could look into handling errors by ourself (https://gulpjs.com/docs/en/getting-started/async-completion#using-an-error-first-callback)

Whats your opinion?

@gijsroge gijsroge changed the title When you trigger an error in the sass build the build gets stuck. When you trigger an error in the sass task the watcher gets stuck. Sep 30, 2019
@MartijnCuppens MartijnCuppens added breaking change bug Something isn't working and removed breaking change labels Oct 1, 2019
@MartijnCuppens
Copy link
Contributor

Maybe #22 causes this. I think we better figure out how to fix that issue first, solving that might solve this (not sure at all, but I know for sure are callbacks are currently not ok)

@MartijnCuppens
Copy link
Contributor

This was actually solved by asyncing the cssCompile() function in #32 🎉

async function cssCompile({src, dest, browserSync = false}) {

@gijsroge
Copy link
Member Author

gijsroge commented Oct 4, 2019

🎉 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants