ChrisMarinos/FSharpKoans

Why navigate to error manually?

cljponies opened this issue · 2 comments

Perhaps less of an issue and more of a whine, but trying the Koans on VS2013 (& VS2010), and when I press F5 I get a console window popup that lists an error message and stack trace:

Please meditate on the following code:
at NUnit.Framework.Assert.That(Object actual, IResolveConstraint expression, String message, Object[] args)
at NUnit.Framework.Assert.AreEqual(Object expected, Object actual)
at FSharpKoans.Core.Helpers.AssertEquality[a,b](a x, b y) in FSharpKoans\FSharpKoans.Core\Helpers.fs:line 17
at FSharpKoans.about asserts.AssertExpectation() in FSharpKoans\AboutAsserts.fs:line 32

I then have to first of all figure out what it's talking about (basically ignore everything except the last line), find the file, and then the line in question. This seems very old school.

Instead, why isn't the appropriate file opened automatically with the error line selected. And maybe a message in the output window or something with the error message. Or better yet one of those squiggly lines that you hover over to get a detailed error explanation. Now, once you "press any key" the Console window is closed, and you have to debug again if you don't remember exactly what it said.

It would be nice to support something like this, but there are two reasons why it's not supported.

  1. The koans are designed to be platform/editor agnostic. The goal is to be able to run the koans in VS, Xamarin Studio, the web, or even from the command line. If this was done in a way that avoided platform lock-in, I'd be all about it.
  2. Effort required. There are other things that I'd rather do first (like make a web-version of the koans).

If someone else wants to take charge and implement this feature, I'd happily accept a pull request. Otherwise, I wouldn't expect it anytime soon.

dsyme commented

This is now a lot better with #51, where use of __ now gives an exception at exactly the place you need to fill something in