Repository navigation
Conversation
…d host-spawn Commands VS Code, its terminal and its extensions run go to the host when the host has them, through the shared extension org.flatpark.Spawn. Adds com.visualstudio.code to the flatpark-spawn allow-list. Part of #1565.
Test this PRA test repository with the apps this PR changes, built from
Install: Already have it from FlatPark? Switch to the test build: To go back to the released build (for a new app, Drop |
|
Testers: install the flatpark-spawn extension as well. The test repository above has only this PR's VS Code build. The extension it uses, Check it with When VS Code is installed from FlatPark itself (once this PR is merged), the extension comes with it and you can skip this step. Optional:
|
VS Code moves from the bundled upstream host-spawn to flatpark-spawn, the shared extension added in #1566. Part of #1565.
What changes for users
Before, host commands needed
host-spawn <command>or a terminal profile pointed at it; everything else (extensions, tasks, the default terminal) only saw the sandbox. Now, when VS Code, its terminal or an extension runs a command the host has (git,node,python,go,gh, the user's mise/asdf toolchains,~/.local/bin), it runs on the host with the user's PATH and configuration, as if VS Code were installed there. Commands only the sandbox has still run in the sandbox. Existing"path": "host-spawn"terminal profiles keep working, since the extension shipshost-spawn.Changes
org.flatpark.Spawn(lib/flatpark-spawn, version 1) and creates the mount point; the host-spawn extra-data is gone.code.sh: the extension'sbinon PATH (flatpark-spawn,host-spawn), andenable.shsourced before the final exec.apply_extra.sh: no host-spawn to unpack.flatpak override --user --no-talk-name=org.freedesktop.Flatpak com.visualstudio.code),FLATPARK_SPAWN_LOCALto keep a command in the sandbox, a host login-shell terminal profile.flatpark.yml: the host-command entry and the talk-name comment describe flatpark-spawn.config/flatpark-spawn.yml:com.visualstudio.codeadded. This is the grant: a maintainer decision, recorded against [Proposal] flatpark-spawn: one shared extension for apps that need the host's toolchain #1565.tests/test_shared_extensions.sh: the "allow-list is empty" check becomes "every allowed app passes its audit".Other permissions are unchanged.
--filesystem=hoststays: projects keep their real paths, and narrowing it wouldn't contain forwarded commands anyway.For testers (test repo via
needs-testers)The test repository carries only this PR's build, not
org.flatpark.Spawn, so the extension doesn't come along with it: install it from FlatPark as well (the command is in a comment below). Without it VS Code starts but runs everything in the sandbox. From FlatPark itself, the extension installs with the app. Carrying shared extensions in test repositories is a follow-up.Please try your usual setup and report what differs from a host install:
Known limits are in flatpark-spawn's README: statically linked callers aren't intercepted (what they run through
sh -cis), the host can't see/app, Ctrl-Z doesn't suspend a forwarded command, a forwarded command costs about 5 ms.