In slicec, diagnostics can optionally have a span attached to them. This span describes where the error occurred (file name line #, etc.)
The language server uses this information to publish the diagnostic in the correct file.
However, not all diagnostics have spans. For example, io errors (the user said to compile b̵l̴o̸p̴b̴l̴o̸p̶.slice and it doesn't exist).
There is no 'location' to this error, so slicec can't associate a span with it.
However, the language server always expects a span to be present, and ignores any diagnostics without one.
This is sub-optimal, since often these errors are usually about very serious problems.
Instead of ignoring these errors, the server should check:
if span.is_some() publish it to the corresponding file.
else, popup an error dialogue in the client containing the error.
We might want to consider consolidating multiple errors into a single dialogue. Or keep them all separate.
Idk what other extensions do.
In
slicec
, diagnostics can optionally have a span attached to them. This span describes where the error occurred (file name line #, etc.) The language server uses this information to publish the diagnostic in the correct file.However, not all diagnostics have spans. For example, io errors (the user said to compile
b̵l̴o̸p̴b̴l̴o̸p̶.slice
and it doesn't exist). There is no 'location' to this error, soslicec
can't associate a span with it.However, the language server always expects a span to be present, and ignores any diagnostics without one. This is sub-optimal, since often these errors are usually about very serious problems.
Instead of ignoring these errors, the server should check:
span.is_some()
publish it to the corresponding file.We might want to consider consolidating multiple errors into a single dialogue. Or keep them all separate. Idk what other extensions do.