Does anyone else find Scala 3 error formatting horribly noisy and unhelpful?

I think this might related, I am experimenting on making the explain a much more accessible feature within metals. We should be able to always show it to user on click.

Which then leads to a separate file:

This is very similar to what Rust does, though we register the file as markdown instead of showing raw diagnostic.

This should be available in 3.8.1 and 3.3.8. For older versions we should be able to link to error code descriptions that are being worked on in Document Scala compiler error codes by WojciechMazur · Pull Request #24734 · scala/scala3 · GitHub

It was suggested that maybe showing it in a separate file is not the best UX experience, but not sure if we can get it to be much better. This will also work for all VS Code based editors. For other editors we’ll most likely have a dedicated code action that creates the file in .metals directory.

Potentially we could replace the diagnostic being shown, but it might easily get out of sync and be more confusing than helpful.

If anyone has any opinions, let us know. I will try to get it out after the new year.

5 Likes