elm / compiler

Compiler for Elm, a functional language for reliable webapps.
https://elm-lang.org/
BSD 3-Clause "New" or "Revised" License
7.51k stars 656 forks source link

Add compile/v2 returning errors in JSON #2217

Closed terezka closed 3 years ago

terezka commented 3 years ago

Quick Summary:

Endpoint /compile is unchanged. The new endpoint /compile/v2:

In case of successful compile: Returns resulting html for iframe, including a message out to notify editor of success. In case of unsuccessful compile: Returns html for iframe which sends out the compilation problems (in JSON format) to editor.

This change was made in order to allow more advanced interactions with errors for the elm-lang.org/try page.

github-actions[bot] commented 3 years ago

Thanks for suggesting these code changes. To set expectations:

Finally, please be patient with the core team. They are trying their best with limited resources.