fsprojects / fsharp-language-server

Other
219 stars 37 forks source link

Any plans to target .NET Core 3.0? #66

Closed PhilT closed 4 years ago

PhilT commented 4 years ago

Just wondering.

PhilT commented 4 years ago

I had a stab at it and it seems to be working although I get the same missing DLL error as in the other issue I mentioned (#67).

I just changed all the references to netcoreapp2.0 to netcoreapp3.0. Not sure if there is anything else that needs doing.

georgewfraser commented 4 years ago

It's a pretty simple extension, the only potential complexities are around the way it gets packaged as a standalone executable.

tani commented 4 years ago

@georgewfraser Does it mean the package for emacs? Could you give me more explanation? I am also interested in upgrading this package for the coming LTS dotnet core.

adamnew123456 commented 4 years ago

@fgborges I assume it refers to the new dotnet 3 deployment options, although it doesn't look like these would affect the current build process. Single-file packing is opt-in, and the build scripts already produce native executables since they all use dotnet publish.

FWIW, my Emacs configuration seems to be running fine after rebuilding with netcoreapp3.0. There are some cases where it dies due to not being able to find fsc.exe, but that's an issue in Buildalyzer and not FSharpLanguageServer.

adamnew123456 commented 4 years ago

The Buildalyzer thing was a red herring, it turns out that the errors I was seeing had to do with some missing assemblies not being loaded. It only affects netcoreapp3.0 projects due to changes in dotnet core itself as described in https://github.com/dotnet/cli/issues/11504.

I was able to use the workaround described there (adding an explicit reference on the Microsoft.NETCore.App package) but it seems like there should be a way to determine these implied packages from the SDK files.

tani commented 4 years ago

Thanks. You think that the incompatibility of Biuldalyzer setting and netcore3.0 causes this issue, right? Shall we refresh configuration around Buildalzyer with some correct ways as you tried?

Oh. It is not Buildalyzer. it is just package configuration.

adamnew123456 commented 4 years ago

I've got a branch up and running at https://github.com/adamnew123456/fsharp-language-server/tree/dotnet-3, which is capable of determining the location of the framework assemblies automatically.

I want to add a unit test before opening a PR, but you can run off that branch currently. The existing unit tests pass on my end and I can open both netcoreapp3 projects as well as netcoreapp2 projects and interact with basic LSP features.

tani commented 4 years ago

So nice. Thank you!!

adamnew123456 commented 4 years ago

The PR is in at #70. There are some adjustments to make framework detection work better on Windows and .NET Core 3.1, as well as updates to the VS Code plugin.