You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current toolbox-vscode implementation is primarily focused on Flatpak installation of VSCode, but I believe that it could support RPM/tar.xz installation of VSCode as well. The main reason one may prefer this approach rather than the Flatpak one is the fact that VSCode updates from Microsoft repository usually come faster than from Flathub (at the time I'm writting, the Flathub latest version is 3 releases behind the official RPM/tar.xz one).
An eventual RPM support needs to take the following details into account (I will edit the list as needed):
Support VSCode config location at ${HOME}/.config/Code/User/globalStorage as well as ${HOME}/.var/app/com.visualstudio.code/config/Code/User/globalStorage
The podman-host.sh script needs to be adapted to spawn podman directly rather than flatpak-spawn --host podman, but settings the same environment variables.
The ~/.local/bin/code symlink may conflict with default code binary path, depending on how user's PATH variable is set.
Maybe provide a way to automatically download VSCode RPM from official repository and install it with dnf / rpm-ostree / whatever.
Maybe support VSCode's tar.xz automatic download and uncompress at /usr/local or /opt folder as well (for ones worried about polluting their Fedora Silverblue/Kinoite installations with layered RPMs). In this case, toolbox-vscode could also check for updates for the tar.xz case.
The text was updated successfully, but these errors were encountered:
I think it's better to keep the Flatpak up-to-date then dodge around the issue. So on Silverblue/Kinoite systems - I'd like to keep recommending the Flatpak.
But if you already have a working VSCode setup on a non-rpm-ostree system, it would be very nice if you could just start using Toolbox and have the integration work properly. Also see: https://pagure.io/fedora-workstation/issue/283 - we're planning to add the RPM repository to Fedora as a 3rd party repository.
I've been holding off on doing anything in this area waiting for requested changes on #20
Some further notes.
I'd rather not prompt for tarball installation. If the user already has it installed via tarball and in the path, that should work.
Sorting out all the possibilities is hard. I think it's something like:
If the Flatpak is installed, use that
Otherwise, if 'code' is in the path ignoring $0, run that
If 'pkcon' is present, and pkcon -p resolve vscode | grep -q '^Available' prompt to install via pkcon
Otherwise, prompt to install via Flatpak
podman-host.sh can check if it's in a flatpak by looking for /.flatpak-info
Finding the next 'code' in the path can be done with something like:
read -d '' -ra path_entries <<(which -a code)
next_code=
for(( i=0; i <${#path_entries[@]}; i++));doif! [ "${path_entries[$i]}"-ef"$0" ] ;then
next_code=${path_entries[$i]}breakfidone
(For installation, I'd actually prefer to be able to ask GNOME Software to prompt to install vscode by the best option for the system, but 'gnome-software --install' doesn't come close to being usable for that. The argument to it is specific to the backend and it either installs without prompting or fails without useful feedback.)
Current toolbox-vscode implementation is primarily focused on Flatpak installation of VSCode, but I believe that it could support RPM/tar.xz installation of VSCode as well. The main reason one may prefer this approach rather than the Flatpak one is the fact that VSCode updates from Microsoft repository usually come faster than from Flathub (at the time I'm writting, the Flathub latest version is 3 releases behind the official RPM/tar.xz one).
An eventual RPM support needs to take the following details into account (I will edit the list as needed):
${HOME}/.config/Code/User/globalStorage
as well as${HOME}/.var/app/com.visualstudio.code/config/Code/User/globalStorage
podman-host.sh
script needs to be adapted to spawnpodman
directly rather thanflatpak-spawn --host podman
, but settings the same environment variables.~/.local/bin/code
symlink may conflict with defaultcode
binary path, depending on how user'sPATH
variable is set.dnf
/rpm-ostree
/ whatever.tar.xz
automatic download and uncompress at/usr/local
or/opt
folder as well (for ones worried about polluting their Fedora Silverblue/Kinoite installations with layered RPMs). In this case, toolbox-vscode could also check for updates for the tar.xz case.The text was updated successfully, but these errors were encountered: