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

Developing ReSharper.FSharp on Linux #107

Open
mcon opened this issue Mar 30, 2020 · 4 comments
Open

Developing ReSharper.FSharp on Linux #107

mcon opened this issue Mar 30, 2020 · 4 comments

Comments

@mcon
Copy link
Contributor

mcon commented Mar 30, 2020

I'm aware this isn't explicitly supported at the moment as per the README, but thought I'd have a quick go to see how far off this is from being possible.

  • Running ./gradlew prepare ran without blowing up
  • Changing the target frameworks to netcoreapp3.1, it seems that quite a few of the referenced packages are netframework only
  • A bunch of winforms references don't look promising for Linux

Is anyone familiar with how far away this support is, what the downstream dependencies are, and whether any help would be appreciated.

@auduchinok
Copy link
Member

auduchinok commented Mar 30, 2020

I haven't tried building/running it on Linux but speaking from my experience it's possible to bulid the plugin, run, and debug it loaded to a sandboxed Rider on macOS which should be a similar experience.

There's no need to change the target frameworks due to use of the reference assemblies package:
https://github.com/JetBrains/fsharp-support/blob/dbee3578ab7ab1170f55481b5169fcfc1b27b325/ReSharper.FSharp/Directory.Build.props#L19

The only stopper is it's not possible to run/debug ReSharper tests which is quite a blocker when you are working on the code. I was promised we'll be able to run tests (hopefully) soon but there are no estimates for now. Migrating to .NET Core can greatly improve things here since many related things are being updated and/or rewritten in the platform.

There is a recent workaround for running tests in the Unity plugin: JetBrains/resharper-unity#1560. It didn't work for me on the first try and I'm going to look into it again later since I'd be happy not to be forced to use Windows for development most of the time too.

Attaching to a Mono runtime sometimes works worse than attaching to a .NET Framework process in terms of debugging features working nicely (some things sometimes cannot be evaluated, some code may be skipped, especially when trying to debug ReSharper SDK code) and it's likely moving to .NET Core will also significantly improve things here since a more stable debugger would be used.

I hope this helps. If there's something that doesn't work for you, please let me know so we could try to fix/improve it. I guess it's high time I updated the readme to reflect the current state. :)

TL;DR Everything except running ReSharper tests should work mostly fine on Linux.

@auduchinok
Copy link
Member

auduchinok commented Mar 30, 2020

There was a bug in 2019.3.x releases that would make Rider choose an MSBuild from Mono instead of the Core one on this solution and it wouldn't work well. If you're using that release please choose an MSBuild from .NET Core SDK in Preferences | Build, Execution, Deployment | Toolset and Build manually.

@mcon
Copy link
Contributor Author

mcon commented Mar 30, 2020

Thanks for getting back to me, so I can get a build working using MSBuild from netcore 3.1.102, but as you suggest I can't run the tests due to (not unsurprising) library load errors.

I did have to make a trivial change to a project file to get the build working however: #108

I was hoping to be able to develop a new code completion feature, but as you say: it's a non-starter without being able to run the tests! Sounds like I should be waiting for you guys to get onto netcore, or digging out an old machine to run Windows on!

@Sejsel
Copy link
Contributor

Sejsel commented Aug 13, 2020

I tested this now, found one generated file that wasn't placed in the correct location (made a PR, #165). Tests are still not supported, but other than that everything seems to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants