ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
850 stars 276 forks source link

Ionide not starting up, long time issue #1930

Closed ShalokShalom closed 9 months ago

ShalokShalom commented 9 months ago

Describe the bug

Hi. 👍🏻😃

This is how Ionide behaves on all my machines. I did experience these issues already two years ago, and thought that they are so fundamental, that surely they will be fixed soon.

So I open a bug report now, hoping this can be fixed by us together. I use the VSCode binary from Microsoft on Linux, install the sdk and Ionide, and start a project.

Most of the time, nothing happens.

Sometimes, some of the IDE features start to kick in, and the compilation feature does not, and sometimes it is the other way around. 🤷🏻‍♂️

Most of the time, the performance is leads to VSCode hanging. From what I can see, I think Ionide can start some of its services, and not all of them.

Steps to reproduce

  1. Open VSCode
  2. Open a fsscript / dotnet project / Polyglot Notebook

Link to sample reproduction

Really anything. I tried with this one and personal code. https://github.com/thedevaspect/aspect-fsharp

Screenshots

Screenshot_20230914_200700

See in this case, how the context menu has certainly loaded Ionide behavior, but there is no Ionide extension logo on the side (this really should be always loaded) and there is also no option to run the code. Also, there is no hover support for anything, or really anything else other than syntax highlighting. Still, the output panel is full with logs, so its certainly doing something.

Machine info

Additional context

Output, verbose: https://paste.ee/p/8Yldf

This is the output that I get, when I launch VSCode, with the fsharp project already open, so I tried to keep the output as minimal and focused as possible.

baronfel commented 9 months ago

Looking at that repo, all you have is a single .fs file, no project file at all. No tooling is going to work with that. You have two options to have tooling support:

ShalokShalom commented 9 months ago

Thanks a lot.

I did not show this in the screenshot, but I did create a project via dotnet new console -lang F# -o Test.FSharp.Project and then switched to that folder, and created a new file.

And it seems like I need to run dotnet build afterward as well. I did not do this before, and it works now.

Weird is, that fsx and fsscript did not work either before, and do now. It seems like I had to once run Ionide successfully via a project, to make it run script files.

Also, with the VSCode solution explorer, it's enough to create the project with the CLI command above, and then open the directory with the extension, without running dotnet build, so I guess this extension include the files who are part of the directory, if they are not yet.

Considering the dotnet new command adds a Program.fs file, would it be sensible to include that one in the project automatically?

Or simply include all .fs files into the fsproj file, if they are in the same folder?