-
Notifications
You must be signed in to change notification settings - Fork 41
When a new file fails to compile it is not watched #74
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
Comments
Hey @ethul, are you actively working on this? If not, I'd like to give it a shot. This is a pretty big pain point for me while developing PureScript applications that have a heavy JavaScript integration. |
I would definitely appreciate a PR for this if you have a chance to work on
it. Thanks!
…On Sat, Dec 17, 2016 at 15:58 Forest Belton ***@***.***> wrote:
Hey @ethul <https://github.com/ethul>, are you actively working on this?
If not, I'd like to give it a shot. This is a pretty big pain point for me
while developing PureScript applications that have a heavy JavaScript
integration.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#74 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAVYyylAD3D-uAPW9Hz2j2Gdsax_kVojks5rJE0GgaJpZM4Ku_-y>
.
|
@forestbelton I was just thinking that it might work to omit passing an error to the webpack callback upon failure. This may keep the file in the watch. So we would make the following a no-op: Line 88 in 5f4d675
I haven't tried this, but this is how the load works when psc-ide is used. Might be worth a try. |
Or not a no-op, but just pass back the previous JS to the callback. |
Here's a possible solution: https://github.com/shama/webpack-stream/pull/126/files |
Thanks for the tip. I was testing out something like this over the weekend. Might very well be the way to go. |
I did an attempt here: tbenst@b8aaa2f But I haven't been able to test as I can't seem to get purs-loader installed via github. I imagine I'm missing a compilation step in building the package. |
Thanks! I think something along these lines might work. I will take a look this weekend and try out some ideas. |
Similar to the way psc-ide support works, the purs-loader now tolerates compiler errors when the `watch` option is true. When webpack is being run in watch mode the user can set `watch` to true in order to avoid failing the webpack bundle creation when the PureScript compiler fails. Resolves issue #66 Resolves issue #73 Resolves issue #74
I've published a beta release that should fix this issue. If anyone is willing to give it a try, that would be great! You can install the release under the
In this release, there is a new option called Thanks! |
In https://github.com/ethul/purs-loader/blob/topic/error-handling/src/to-javascript.js
Line 45 |
Thank you for catching this. I've fixed this in |
Works without any issues now. Awesome! Thank you!!! |
Great! Thank you for confirming |
Just noticed, builds stop working if a file is removed. |
If imports to the file removed are also removed, does the build work once again? |
Unfortunately, I cannot reliably reproduce this issue, but it has something to do with dependencies. When I find suitable scenario I'll write it. |
I'm also having occasional difficulty, it works initially but occasionally stops watching after many minutes. I know that's vague and will report back if I notice a pattern Edit: seems to stop watching when a |
Thanks for following up on this. I will try out the ErrorParsingModule and UndefinedTypeVariable cases. Thanks! |
I released I haven't been able to reproduce the watch issue yet. I tried the two errors above, but it seems to be working for me. Maybe we can track this as a new issue if we can get a reproducible case. |
No description provided.
The text was updated successfully, but these errors were encountered: