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

Provide and document a way to run the plugin with a locally built FCS #494

Open
safesparrow opened this issue Mar 5, 2023 · 1 comment

Comments

@safesparrow
Copy link

safesparrow commented Mar 5, 2023

I would like to run the Rider F# plugin with a locally built FCS. This would allow me to do the following:

  • easily debug the internals of FCS when using Rider
  • test any local/newly introduced modifications of FCS against Rider

I have a workaround, which is currently as follows:

  1. Checkout https://github.com/JetBrains/fsharp/tree/net231
  2. ./build.cmd -noVisualStudio - this fails, but only for test projects that are not relevant - is there a script that does not fail?
  3. Copy FSharp.Compiler.Service.dll to $NUGET_CACHE\jetbrains.fsharp.compiler.service\2023.1.1\lib\netstandard2.0\
  4. dotnet restore --force && dotnet build to bring in the built dll to the plugin.
  5. Run the IDE as usual.

This is hacky and cumbersome.

I would expect that maintainers of this repo have a much better workflow.
Would it be possible to share it if it exists?

Plugin and FCS in one solution

What would make debugging and hacking around even better would be having a single solution containing both the plugin projects and FCS projects - for local dev purposes only.
This way one can make changes to both and debug both.

Currently this involves opening two solutions, doing the NuGet dance as described above, and only one of the two solutions can have a debugger attached to the backend process, so it's not possible to debug both sides at the same time.

I believe this might be of interest to @nojaf .

@safesparrow
Copy link
Author

For this to work well, dotnet/fsharp#14677 should be done first - this would avoid having to build the bootstrap compiler and avoid any dependencies that brings in (which probably won't work if projects are referenced from another solution/directory).

I tried the changes from that PR in this repo, and I'm getting the following error:

dotnet build .\FSharp.Compiler.Service.sln /p:BUILDING_USING_DOTNET=true
...
C:\projekty\fsharp\jetbrains-fsharp\src\Compiler\FSharp.Compiler.Service.fsproj : error MSB4057: The target "_GetRestoreSettingsPerF
ramework" does not exist in the project. [TargetFramework=netstandard2.0]

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

1 participant