-
Notifications
You must be signed in to change notification settings - Fork 147
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
Make Warnings visible, even when elm-app start
successfully compiles
#15
Comments
@halfzebra if you have not started work on this I'd love to take a stab at it? :) |
@jackfranklin That would be awesome! As of today #36, #38 are in my pipeline for the next release. |
@halfzebra so I took a look at this and I think there might be a bug in the elm-webpack-loader. It doesn't ever seem to pass the warnings through - so in the script where we call |
I wonder if there's a different approach that would avoid the need for the hasWarnings call. Specifically, if you use a non-destructive screen clear, instead of totally wiping the screen buffer, then users would have the option of scrolling up to go back and see the results of the compilation, including any warnings or other informational messages. |
@jdashton the thing is that node-elm-compiler will only print out warnings, when there's a compilation error. There's no way of retrieving the warnings without changing the way node compiler works. |
My confusion would be that I think that I see warnings scroll past in that window, even in the no-error case. However, the web server clears the window in a way that prevents scrolling back to check what I have just seen. I apologize if I'm misinterpreting what I'm seeing. |
@halfzebra If it's missing in the If @jdashton is right, it would be because of the |
Yeah, I can confirm that I can see what @jdashton is describing. I have a simple application where this is happening (both before and after ejecting). Here is a short video, even though the browser popped out I managed to catch before it got cleared. You can pause at 0:06 to see it clearly. |
I'm just getting started with Elm (using the Webpack setup from Create Elm App), and I can't figure out a good way to see warnings for all the Elm files in my project.
Any suggested workarounds for now? |
(FWIW, this is the crude script that I'm currently using as a workaround) 👇
|
The problem with this issue is that the loader does not send the warnings in the way intended by the Webpack's API. The warnings are piped into stdout directly from the compiler. There are two options:
I'll see what I can do with the second option for now 🤔 |
Closing this due to elm-community/elm-webpack-loader#141 (comment) |
When
elm-app start
fails to compile, you'll get a list of warnings and errors, but when it succeeds, the warnings does not show.It would be helpful to show the warnings along with the "compiled successfully" screen, as they often contain some useful information.
The text was updated successfully, but these errors were encountered: