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 4 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