flatpak-vscode icon indicating copy to clipboard operation
flatpak-vscode copied to clipboard

Automatically detect rust-nightly flatpak sdk

Open haecker-felix opened this issue 11 months ago • 2 comments

For my project I use rust-nightly instead of the rust-stable sdk extension:

{
    "app-id" : "de.haeckerfelix.Shortwave.Devel",
    "runtime" : "org.gnome.Platform",
    "runtime-version" : "master",
    "sdk" : "org.gnome.Sdk",
    "sdk-extensions" : [
        "org.freedesktop.Sdk.Extension.rust-nightly",
        "org.freedesktop.Sdk.Extension.llvm16"
    ],
    ... 
    "build-options" : {
        "append-path" : "/usr/lib/sdk/rust-nightly/bin:/usr/lib/sdk/llvm16/bin",

The extension automatically generates the .flatpak/rust-analyzer.sh script, which apparently hard codes rust-stable for the path (/usr/lib/sdk/rust-stable/bin/rust-analyzer), which prevents rust-analyzer from launching.

Adjusting the path manually fixes it, though I wonder if it would be possible to automatically set the correct path depending of the append-path variable of the Flatpak manifest.

haecker-felix avatar Feb 28 '24 19:02 haecker-felix

Oh, that is indeed not good.

SeaDve avatar Feb 29 '24 09:02 SeaDve

I opened #234 that hopefully fixes it but I can't test it with https://github.com/bilelmoussaoui/flatpak-vscode/commit/80ffc8e071af7a609d931daa2caddc97741a4e35 since that apparently breaks rust-analyzer

Edit: anyway, that should also be fixed now via https://github.com/bilelmoussaoui/flatpak-vscode/pull/235

SeaDve avatar Feb 29 '24 10:02 SeaDve