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
Improve error reporting: add an url with more info for each warning/error #1136
Comments
@enricosada it seems the tooling could make up the link actually, not sure if putting it right in the error message is the best approach. But I really like the idea to have a canonical page for each compiler error. |
I actually had a similar thought. Perhaps this is something that could be exposed as metadata by FSC rather than directly within the error message though? |
I'd like to improve discoverability. For sure as metadata can help a lot ide To improve text output message of compiler, maybe a single note at beginning/end is enough
|
We should list the links once at the very end (in case same error number is repeated several times). We need to setup good platform for the contents, the pages should point to msdn description (msdn documentation for F# compilers is pretty good) for each message and have a great "code oriented" summary describing the problem with all bells and whistles from FSharp.Formatting project. |
Is there a way to progress this? @cartermp would it be possible / acceptable to set up something on F# MSDN which contains a list of all F# compiler error messages along with examples of each. Then, we can look to bake that into Code + VS so that every compiler error has either a URL link to the error, or even better a little pop-up with the details? As long as all the pages follow a standard format, someone can write code to parse the content and display within an IDE. |
@isaacabraham I think it would be a relevant content to host on fsharp.org: https://compiler.fsharp.org/messages/fs0001 |
I love this, but I wonder if with the current state of IDEs it would be better to include this information as part of a structured diagnostic, rather than append URL text to the end of the text message. @baronfel ? |
We actually do this to some extent already in Ionide, based on the pages that have been submitted to the MS docs: https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/compiler-messages/fs0001 All diagnostics with an error code get this clickable link, which led to dotnet/docs#25769 beccause the vast majority of diagnostics don't have a page made for them. There's a parallel mechanism using the Visual Studio help search mechanism called out in that thread that could be useful, and if either of those two mechanisms was 'regularized' enough, the FCS APIs around diagnostics could start emitting those urls. |
I think it's possible to add, unobtrusively, a short link to more info for each warning/error message
like
Write a good context sensitive info help fix the error, but a good link help to study in deep the issue because can contain code examples, more urls, long description, etc and that's the second choice if the error message is not enough (for example new users)
That's should be good also for tooltips, because urls can be converted to links easily in every ide, or automatically in lot of editors.
Also is going to be really nice for search too, because for example googling for fsc error FS0001 give some info (and the 5th link is the amazing fsharpforfunandprofit tutorial) but is mixed with other errors
ref #1103
The text was updated successfully, but these errors were encountered: