ionide / ionide-vscode-fsharp

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

Ionide doesn't start realiably in devcontainer #1660

Closed NicoVIII closed 2 years ago

NicoVIII commented 2 years ago

Describe the bug

I use many devcontainers to develop with Ionide and F# in VS Code. For some reason the Ionide extension does not start reliably anymore in this setting. Often I have to close VScode after first start of the devcontainer and open it again to have a chance that Ionide starts and shows its project tab. I set the FSharp.workspacePath in the settings, I feel like that helped with starting on second try, but it still doesn't work on first start of the devcontainer.

In the output tab I can find the installation of the C# dependencies in the "C#" log and the start of the OmniSharp server in "OmniSharp Log" log.

If I enable devtools, the console log differs. If Ionide doesn't start the output [Extension Host] DOTNET PATH: and [Extension Host] FSAC (NETCORE): is missing.

Sometimes there is an error, which isn't there, if Ionide starts:

  ERR Cannot read property 'identifier' of undefined: TypeError: Cannot read property 'identifier' of undefined
    at E._computeEnablementState (vscode-file://vscode-app/opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:2981:98703)
    at E.getEnablementState (vscode-file://vscode-app/opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:2981:95367)
    at E.isEnabled (vscode-file://vscode-app/opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:2981:98404)
    at g._handleMissingInstalledDependency (vscode-file://vscode-app/opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:1892:23965)
    at g.$onExtensionActivationError (vscode-file://vscode-app/opt/visual-studio-code/resources/app/out/vs/workbench/workbench.desktop.main.js:1892:23570)

But I have no clue if this really has to do with it not starting. On other tries when it does not start, it prints: [Extension Host] DOTNET PATH: undefined but this was fixed by setting FSharp.dotnetRoot. Then the error shows up again.

If I can somehow provide more information, please tell me how.

Steps to reproduce

Open a F# project in a devcontainer (like https://github.com/NicoVIII/Andromeda-for-GOG) for the first time or use "Rebuild Container".

Link to sample reproduction

e.g. the repo https://github.com/NicoVIII/Andromeda-for-GOG can be used.

Expected behaviour

Ionide does start reliably.

Screenshots

Bildschirmfoto von 2022-01-29 16-51-10

Machine info

NicoVIII commented 2 years ago

I don't know in which version something changes, but I would guess it was something in VScode itself. I'm using 1.66.2 now and it prompts me that Ionide could not be activated in this scenario, because the dependency wasn't installed (yet). It allows me to install it and reload from there.

It is a far better experience, therefore I'm closing this issue.