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

Use async version of elm compiler to be able to get the error message #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rogeriochaves
Copy link

I want to be able to display the error message on the screen, for that I need to capture the error message produced during a compilation error, but this is not possible because the sync function from node-elm-compiler returns just a hardcoded string, as you can see here: rtfeldman/node-elm-compiler#110

Since we are already in an async function, we might as well just use await here and get the proper error message

I want to be able to display the error message on the screen, for that I need to capture the error message produced during a compilation error, but this is not possible because the sync function from node-elm-compiler returns just a hardcoded string, as you can see here: rtfeldman/node-elm-compiler#110

Since we are already in an async function, we might as well just use await here and get the proper error message
@phenax
Copy link
Owner

phenax commented Jun 19, 2022

Unfotunately, as mentioned in #2, this can result in compilation failing occasionally due to corrupt builds.

I want to be able to display the error message on the screen

Can you elaborate a bit on this? The error messages generated by elm are piped through to stderr so not sure what you mean by this.

@rogeriochaves
Copy link
Author

rogeriochaves commented Jun 23, 2022

@phenax when I'm focusing on build the UI, I rely on hot reloading to refresh the screen, having just the code and the browser open side by side, so I wanted to display the errors in the DOM directly (like phoenix does when there is a backend error), with an overlay, not having to switch to the terminal

@phenax
Copy link
Owner

phenax commented Jun 23, 2022

@rogeriochaves As mentioned in #2, this could lead to broken builds so I think this issue should be fixed upstream instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants