flathub / com.visualstudio.code

https://flathub.org/apps/details/com.visualstudio.code
152 stars 72 forks source link

[dotnet, golang] Connot access to extension SDK despite it being installed and FLATPAK_ENABLE_SDK_EXT being used #434

Open Dremor opened 1 year ago

Dremor commented 1 year ago

I installed VSCode through Flatpak, and followed the instruction in the first run text file, but VSCode as well as VScode-OSS both do not detect the Flatpak sdk extension.

I tried both FLATPAK_ENABLE_SDK_EXT=dotnet and FLATPAK_ENABLE_SDK_EXT=dotnet7 before flatpak run com.visualstudio.code, both returned Requested SDK extension "dotnet" is not installed

Installed SDKs:

$ flatpak list | grep -i sdk
Freedesktop SDK org.freedesktop.Sdk 22.08.15    22.08   flathub system
.NET Core SDK extension org.freedesktop.Sdk.Extension.dotnet7   7.0.401 23.08   flathub system
Go programming language Sdk extension   org.freedesktop.Sdk.Extension.golang    1.21.0  23.08   flathub system

Same problem with the golang extenssion and FLATPAK_ENABLE_SDK_EXT=golang

In all cases /usr/lib/sdk/ is empty.

Edit: the command $ find / -iname dotnet returns no result when executed inside the container.

Edit2: Something noteworthy I ended up finding is that the dotnet6 sdk do work as intended, but both dotnet5, dotnet7 and golang don't.

chanster commented 1 year ago

Try downgrading to the 22.08 branch for each Sdk Extension

flatpak install org.freedesktop.Sdk.Extension.dotnet7 org.freedesktop.Sdk.Extension.golang org.freedesktop.Sdk.Extension.rust-stable
Looking for matches…
Similar refs found for ‘org.freedesktop.Sdk.Extension.dotnet7’ in remote ‘flathub’ (user):

   1) runtime/org.freedesktop.Sdk.Extension.dotnet7/x86_64/22.08
   2) runtime/org.freedesktop.Sdk.Extension.dotnet7/x86_64/23.08

Which do you want to use (0 to abort)? [0-2]: 1
Similar refs found for ‘org.freedesktop.Sdk.Extension.golang’ in remote ‘flathub’ (user):

   1) runtime/org.freedesktop.Sdk.Extension.golang/x86_64/19.08
   2) runtime/org.freedesktop.Sdk.Extension.golang/x86_64/20.08
   3) runtime/org.freedesktop.Sdk.Extension.golang/x86_64/21.08
   4) runtime/org.freedesktop.Sdk.Extension.golang/x86_64/1.6
   5) runtime/org.freedesktop.Sdk.Extension.golang/x86_64/22.08
   6) runtime/org.freedesktop.Sdk.Extension.golang/x86_64/23.08
   7) runtime/org.freedesktop.Sdk.Extension.golang/x86_64/18.08

Which do you want to use (0 to abort)? [0-7]: 5

Then when running vscode, you may see the extensions load successfully

flatpak run com.visualstudio.code
flatpak-vscode: Enabling SDK extension "golang"
flatpak-vscode: Enabling SDK extension "dotnet7"

I have overrides set to I do not need to pass in the env.

flatpak --user override --show com.visualstudio.code
[Environment]
FLATPAK_ENABLE_SDK_EXT=golang,dotnet7
Dremor commented 1 year ago

Both works with the 22.08 branch. Is it normal or is there a need for a fix ?

chanster commented 1 year ago

It's because this flatpak is built upon the 22.08 of org.freedesktop.Sdk, so we want to install the SDK extensions that are also built upon the same version.

See the source for com.visualstudio.code.yaml showing the org.freedesktop.Sdk runtime.

omergoktas commented 10 months ago

Would have been great if you have also updated the README.md

chanster commented 10 months ago

Looks like #473 this merge resolves this issue.

Dremor commented 10 months ago

Looks like #473 this merge resolves this issue.

Until the next runtime major update. It is kinda the problem with Flatpak extension. Is it doesn't know for which app we are installing the extension, it just instal the latest one.

Would have been great if you have also updated the README.md

Maybe we should create our own extension that just pulls the correct extension, for the correct runtime. If we update this in the documentation, we'll have to continue doing it every times we update the runtime.

ricvelozo commented 10 months ago

I tried to use the PHP 8.2 SDK extension (22.08 branch) and had the same problem.