-
Notifications
You must be signed in to change notification settings - Fork 240
Surface compiler warnings/errors in the UI #17
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
Would be solved as part of #26 if we get language tools to work in the browser - except you want a more prominent display similar to what the current REPL does. |
It occurs to me that since compiler errors are being surfaced via the Vite overlay, warnings probably should be too. @dominikg do you know if that's possible? |
Possible from v-p-s via custom message on vite websocket. Either from onwarn or directly in compile util. Needs a new config option (disabled by default) and possibly some ui/console.log implementation so it makes sense outside of learn.svelte.dev |
We already have some treatment for onwarn so adding it isn't a big deal. sveltejs/vite-plugin-svelte#372 |
From a ux perspective it doesn't make sense to use a blocking overlay for warnings. Not sure how to get these displayed directly in the editor pane but as long as the sourcemaps are ok it should work. Unfortunately preprocessor sourcemaps are hit and miss, so ymmv. |
Co-authored-by: Rich Harris <[email protected]>
Implemented inline warnings. Errors are still a TODO, but warnings were the priority since these don't surface in the Vite overlay, and the tutorial text refers to a11y warnings very early on. This now appears on hover: |
ohhh, this is nice! Idea: would it be possible to have a similar style for the warning on left and right pane so that the user immediately recognizes it? |
Errors will be shown in the error overlay, but it's not the friendliest thing in the world (hard to know where the error is without sourcemaps/code frame). Warnings won't be shown at all.
Realistically this means doing analysis in a separate worker, which will be finicky
The text was updated successfully, but these errors were encountered: