Skip to content

gopherjs serve: Display compilation errors in browser console. #232

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

Merged
merged 1 commit into from
May 31, 2015
Merged

gopherjs serve: Display compilation errors in browser console. #232

merged 1 commit into from
May 31, 2015

Conversation

dmitshur
Copy link
Member

This is nice when using with gopherjs serve, because it already recompiles on browser refresh. This allows one to switch between code editor and browser for a faster iteration cycle. No need to also switch to the terminal to see errors, as now both compilation and runtime errors are visible in browser console.

I'm backporting some enhancements from my gopherjs_serve_html tool, so I can stop using it and rely on gopherjs serve full time.

This resolves a future enhancement that was mentioned in #121 (comment).

This is nice when using with gopherjs serve, because it already
recompiles on browser refresh. This allows one to switch between code
editor and browser for a faster iteration cycle. No need to also switch
to the terminal to see errors, as now both compilation and runtime
errors are visible in browser console.
@dmitshur
Copy link
Member Author

A possible future enhancement here is to make use of source mapping to have the browser display compilation errors in the actual Go code.

I'm not very familiar with the details of how source mapping works, but I think it can be done.

neelance added a commit that referenced this pull request May 31, 2015
gopherjs serve: Display compilation errors in browser console.
@neelance neelance merged commit 272350f into gopherjs:master May 31, 2015
@dmitshur dmitshur deleted the serve-display-errors-in-browser branch May 31, 2015 18:26
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