I'm helping out with a course in F#, using Ionide as the officially supported solution. By and large it's going swimmingly, which I have to thank you guys for. There have been two common failure modes though:
Both of these stem from a failure to follow the documentation consistently; you could see that as an indictment of the students, or the documentation, or (like me) you could conclude that getting 150 students to read and follow more than three lines of documentation is a fool's errand.
I'm not sure if this is possible within VS Code, but one thing which would be cool is if ionide-fsharp popped a comprehensive error message when the following conditions were met:
.fs, .fsi, .fsx)fsi returns an error codeOne thing that might be useful is the approach I took to this PR: https://github.com/fsprojects/ProjectScaffold/pull/286
What I did, which may or may not be a good approach for Ionide, was to leverage the MSBuild system (and particularly its MSBuildExtensionsPath32 environment variable) to check for the Microsoft.FSharp.Targets file, and print appropriate error messages for Windows, OS X, and Linux.
I don't have time right now to adapt that approach to Ionide, but I offer it as a suggestion for anyone else who wants to tackle this.
I'm looking into this issue and I had a question on when this check should be done. Does it make sense for the Language Service to do that check as part of it's startup?
That sounds like a great idea to me.
I am looking at this currently and trying to make a modest improvement. I wanted to share thoughts here before I go too far down a wrong path, but having had a bunch of users locally fail with this pattern, I am currently implementing a simple patch that augments the current cryptic "Failed to start language services. Please check if Microsoft Build Tools 2013 are installed" message. Specifically, I want to create a simple page that opens which summarizes the attempts to find the various pieces that ionide is looking for (msbuild, mono, fsautocomplete.exe) and their status, with links to installation instructions and presence/absence on the machine. This should both help diagnose a broken installation and point user towards fixing it. There wasn't enough real estate (or ability to add links) in the error message, hence thoughts about creating a new page that opens. Thoughts on that user design and what you want to see on a status page? (I was recenty a victim of anti virus software assassinating fsautocomplete.exe hence idea of giving user a full report on what's findable or not.
I think I'd go with:
showInformationMessage call - we could add View more info button that would open the documentation in the internet browser (https://github.com/ionide/ionide-vscode-fsharp/blob/master/src/Components/Help.fs#L32)Additionally:
Given the rise of popularity of .Net Core / dotnet SDK I don't think it's going to be problem in the future as if you install dotnet SDK you have F# installed as part of it.