flathub / flathub/com.visualstudio.code

Idea for handling Visual Studio Code's SDK and $PATH woes

Offen
#72 3 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Shell
Sterne
217
Forks
82
Ø Merge
1 T. 7 Std.
Gemergte PRs (30 T.)
1

Beschreibung

As part of the [Unity Hub Flatpak](https://github.com/flathub/flathub/pull/839), Visual Studio Code needs to be able to handle C# code via Omnisharp. This has gotten me a bit stuck, as Omnisharp (as well as some other VS Code extensions) wants the dotnet SDK binary to be directly in `$PATH`, but it's in `/usr/lib/sdk/dotnet/bin`. You could technically use an override to add it to the PATH, but having this be required just to use Untiy Hub doesn't seem overly user friendly.

In fact, this is really a general problem. Flatpak intentionally doesn't add SDK extensions to the PATH to avoid conflicts, but sometimes we just need it there.

Now comes the idea: include a "Flatpak SDK Extension PATH Manager" (name of course not final) extension as part of the default installation. This extension would have a check box for every installed SDK extension, and the user could mark the boxes for the SDK extensions they want to be in their PATH. Whenever VS Code is started, the "Flatpak SDK Path Manager" VS Code extension would go through all the selected SDK extensions and update the VS Code environment with the SDK extensions' `enable.sh` environment.

This would avoid the potential conflicts (as the user is still in charge of deciding what goes in the PATH and what doesn't), but it would also make it far more user-friendly to be able to add whatever is needed to the default PATH without having to mess with overrides and the Flatpak CLI.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne mit dem Unity Hub Flatpak PR #839 und der VS Code Omnisharp-Anforderung für das dotnet SDK. Untersuche, wie das SDK unter /usr/lib/sdk/dotnet/bin und die Umgebung von SDK-Erweiterungen’ enable.sh behandelt werden. Die Umsetzung sollte eine definierte, vom Benutzer kontrollierte Möglichkeit bieten, SDK-Erweiterungen auszuwählen, deren Umgebung beim Start von VS Code verfügbar ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp, shell, unity, vscode
Bereich
developer-experience, tooling
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.