Skip to content
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

Visual Studio live testing not working with F# #1784

Open
forki opened this issue Nov 19, 2016 · 18 comments
Open

Visual Studio live testing not working with F# #1784

forki opened this issue Nov 19, 2016 · 18 comments
Labels
Area-VS VS support for F# not covered elsewhere Feature Request
Milestone

Comments

@forki
Copy link
Contributor

forki commented Nov 19, 2016

edit by @cartermp

NCrunch is a third-party alternative to Live Unit Testing that supports F# tests, see here: #1784 (comment)

--

Original issue:

According to twitter discussions the new ncrunch-like live testing feature in visual Studio 2017 is not working with F#. That would be really a shame if that is the case on RTM.

@matthid
Copy link
Contributor

matthid commented Nov 19, 2016

Best chance at this is probably ionide (example is code lense which is dying on uservoice)... Maybe if we ask @Krzysztof-Cieslak nicely ;)

On the other hand: Does this even support anything but mstest? If it doesn't, it might not be as usable as we think.

@forki
Copy link
Contributor Author

forki commented Nov 19, 2016

https://blogs.msdn.microsoft.com/visualstudio/2016/11/18/live-unit-testing-visual-studio-2017-rc/ says nunit, xunit and mstest.

Since ncrunch works well with F# I assume it's "just" a matter of Microsoft assigning a good developer on that topic. ;-)

@Krzysztof-Cieslak
Copy link
Contributor

Why care about MSFT? There is community based project trying to do it, just needs some better support from community and contributors: https://github.com/parthopdas/tddstud10-vscode

@Krzysztof-Cieslak
Copy link
Contributor

And Core project - https://github.com/parthopdas/tddstud10

@matthid
Copy link
Contributor

matthid commented Nov 19, 2016

@Krzysztof-Cieslak Thanks for pointing to those projects.
@forki Thanks for the link.

Ok so this sounds "doable". Maybe it comes "for free" with the roslyn integration?

@cartermp
Copy link
Contributor

cc @morrisjoe for LUT and F#

@forki
Copy link
Contributor Author

forki commented Nov 19, 2016

@matthid nothing is for free - not even if we have roslyn.

@morrisjoe
Copy link

@cartermp . Initial target was C#/VB with .NET Framework and 3 test frameworks of nunit, xunit and mstest. Other languages, other frameworks, feature enhancements are in the backlog, which we need to prioritize. Thanks for the feedback on F#.

@forki
Copy link
Contributor Author

forki commented Nov 20, 2016

@morrisjoe I know many devs in the F# community that really use ncrunch a lot. So I assume it's what you want to try next. Also there are many mixed F#/C# solutions out there (where tests are often written in F#) and it would be weird to have that break.

@dsyme dsyme changed the title Live testing not working with F# Visual Studio live testing not working with F# Nov 21, 2016
@dsyme
Copy link
Contributor

dsyme commented Jun 22, 2017

This is external. @morrisjoe do you have a tracking bug we can link to for the feature request for your team? thanks

@dsyme dsyme closed this as completed Jun 22, 2017
@OnurGumus
Copy link
Contributor

Any updates on this?

@cartermp
Copy link
Contributor

@dsyme Let's re-open since there is a component to this that we'd have to do.

My understanding is that LUT basically asks the language service to yield back syntax nodes that it can instrument. That would make it a service similar to breakpoint resolution.

@KevinH-MS Happy to chat in the office next week about this, but off hand would you have an estimate of the work it would take to get LUT instrumentation to understand what we'd yield back?

@OnurGumus
Copy link
Contributor

Ping!

@OnurGumus
Copy link
Contributor

Sorry for double posting but, I just want to highlight importance of this for F# adoption.

As you know F# has already excellent testing libraries. But to give you an example from F# adoption point of view, I am leading a team of developers, and writing our tests in F# would be a good entry point to the language for my team. However, doing so we have to give up the live unit testing facility which is also very useful for us. If this feature is implemented nothing will stop us from using F#.

@forki
Copy link
Contributor Author

forki commented May 9, 2018

@OnurGumus while I'd love to see MS invest in things like that, I don't really think these teams make that a priority.

You have good alternatives:

@OnurGumus
Copy link
Contributor

@forki I didn't know about ncrunch. That might actually fit to our needs. Neptune is also nice though we use Visual Studio.

@cartermp cartermp added this to the Unknown milestone Aug 25, 2018
@dharmaturtle
Copy link

I'm using NCrunch with F#, and it works quite well. Well worth the investment. NCrunch's parallel execution is quite nice, as is the console output. I can drop a printfn where I wanna see a variable's value, and it'll appear in the sidebar.

image

Video: https://thumbs.gfycat.com/PortlyPeskyAsiaticlesserfreshwaterclam.webp

@cartermp
Copy link
Contributor

cartermp commented Apr 29, 2019

@dharmaturtle Thanks! I've updated the original post so that if other folks run into this, they can see your post easier.

@dsyme dsyme added Area-VS VS support for F# not covered elsewhere and removed Area-LangService-API labels Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-VS VS support for F# not covered elsewhere Feature Request
Projects
Archived in project
Development

No branches or pull requests

10 participants