bilelmoussaoui / flatpak-vscode

Integrate Flatpak with VSCode
MIT License
92 stars 13 forks source link

Build command ends up using the wrong rustc version #238

Open matzipan opened 3 months ago

matzipan commented 3 months ago

Rustup installed rustc:

$ rustc --version
rustc 1.75.0 (82e1608df 2023-12-21)

flatpak:

$ flatpak info org.freedesktop.Sdk.Extension.rust-stable

Rust stable - Rust stable compiler and tools extension for the flatpak
Freedesktop SDK

          ID: org.freedesktop.Sdk.Extension.rust-stable
         Ref: runtime/org.freedesktop.Sdk.Extension.rust-stable/x86_64/23.08
        Arch: x86_64
      Branch: 23.08
     Version: 1.79.0
     License: Apache-2.0 AND MIT
      Origin: flathub
  Collection: org.flathub.Stable
Installation: user
   Installed: 1,6 GB

      Commit: afdbd61093875f6da84e29ca349d6d46251bbfa5d5ca731f0777fe518380c1ef
      Parent: a36fd3a685f376686bfd7613619ea22c54ed3b9ae0a476677cc745ad9b94942c
     Subject: rust-analyzer: Update rust-analyzer-linux.gz to 2024-07-22 (338bfc60)
        Date: 2024-07-22 07:10:43 +0000

Trying to enter the same build setup that is used by the build command to check the version:

$ flatpak build --share=network --filesystem=/home/matzipan/Workspace/envelope --filesystem=/home/matzipan/Workspace/envelope/.flatpak/repo --env=PATH=/home/matzipan/.cargo/bin:/home/matzipan/.local/bin:/home/matzipan/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/app/bin:/usr/bin:/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/llvm14/bin --env=LD_LIBRARY_PATH=/app/lib --env=PKG_CONFIG_PATH=/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig --filesystem=/home/matzipan/Workspace/envelope/_build /home/matzipan/Workspace/envelope/.flatpak/repo bash
bash-5.2$ rustc --version
rustc 1.75.0 (82e1608df 2023-12-21)

Doing the same thing after a rustup update to 1.79.0:

$ flatpak build --share=network --filesystem=/home/matzipan/Workspace/envelope --filesystem=/home/matzipan/Workspace/envelope/.flatpak/repo --env=PATH=/home/matzipan/.local/bin:/home/matzipan/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/app/bin:/usr/bin:/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/llvm14/bin --env=LD_LIBRARY_PATH=/app/lib --env=PKG_CONFIG_PATH=/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig --filesystem=/home/matzipan/Workspace/envelope/_build /home/matzipan/Workspace/envelope/.flatpak/repo bash
bash-5.2$ rustc --version
rustc 1.79.0 (129f3b996 2024-06-10)
SeaDve commented 3 months ago

Does opening a Flatpak build terminal yield the same results?

Also, can you show the manifest used to build it?

matzipan commented 2 months ago

Does opening a Flatpak build terminal yield the same results?

Interestingly, no.

Also, can you show the manifest used to build it?

Manifest: https://gitlab.gnome.org/felinira/envelope/-/blob/main/build-aux/app.drey.Envelope.Devel.json?ref_type=heads

With one diff:

diff --git a/build-aux/app.drey.Envelope.Devel.json b/build-aux/app.drey.Envelope.Devel.json
index d0983c9..8d0f88d 100644
--- a/build-aux/app.drey.Envelope.Devel.json
+++ b/build-aux/app.drey.Envelope.Devel.json
@@ -1,7 +1,7 @@
 {
     "id": "app.drey.Envelope.Devel",
     "runtime": "org.gnome.Platform",
-    "runtime-version": "master",
+    "runtime-version": "45",
     "sdk": "org.gnome.Sdk",
     "sdk-extensions": [
         "org.freedesktop.Sdk.Extension.rust-stable"
bilelmoussaoui commented 2 months ago

does it also happen if you use prepend-path instead of append-path in your manifest?