Skip to content

Set no Wayland or toolkit variables without a compositor - #52

Open
jsegaran wants to merge 1 commit into
mainfrom
jsegaran/eng-4014-no-wayland-env-without-compositor
Open

jsegaran wants to merge 1 commit into
mainfrom
jsegaran/eng-4014-no-wayland-env-without-compositor

Conversation

@jsegaran

Copy link
Copy Markdown

Fixes the yas half of ENG-4014.

Off Linux, spawn_compositor is a stub whose socket_name is empty, but PTY spawns and prepare_session_env still pass Some("") to app_env::session_env. That exports WAYLAND_DISPLAY= plus every toolkit_env pin (QT_QPA_PLATFORM=wayland, GDK_BACKEND=wayland, SDL_VIDEODRIVER=wayland, XDG_SESSION_TYPE=wayland, ...) into every macOS shell, and Qt apps abort with "Could not find the Qt platform plugin "wayland" ... Available platform plugins are: cocoa".

session_env now treats an empty socket name as no display. Linux is unchanged: a real compositor always has a non-empty socket path. yas-run/yas main (117716c) has the identical code, so this applies upstream as is.

Testing: new an_empty_socket_name_sets_no_display_variables test. cargo test -p yas-server --lib app_env, cargo fmt -- --check and cargo clippy -p yas-server --all-targets -- -D warnings (Rust 1.97.1) pass. The same change and test failed without the fix in blit (indent-com/blit#319, closed in favor of this).

View in Indent
Tag @indent to continue the conversation here.

Off Linux the compositor is a stub whose socket name is empty, but PTY and
session-env spawns still passed Some("") to session_env, which exported an
empty WAYLAND_DISPLAY and pinned Qt, GTK, SDL, Electron and Firefox to
Wayland. On macOS a Qt app then aborts: "Could not find the Qt platform
plugin wayland ... Available platform plugins are: cocoa".
@linear-code

linear-code Bot commented Oct 26, 2026

Copy link
Copy Markdown

ENG-4014

@github-actions

Copy link
Copy Markdown

Coverage

Crate Lines Functions Regions
alacritty-driver 85.6% (1081/1263) 89.4% (84/94) 89.3% (1746/1955)
browser 25.5% (309/1212) 30.4% (34/112) 27.7% (605/2183)
cli 32.4% (6661/20544) 33.6% (615/1831) 33.4% (9789/29330)
client 66.9% (4968/7425) 68.1% (627/921) 65.1% (6423/9873)
composite-transport 96.3% (526/546) 98.4% (60/61) 96.2% (884/919)
compositor 54.9% (11399/20763) 65.9% (831/1261) 54.7% (15786/28844)
desktop 78.4% (4460/5691) 71.6% (393/549) 75.1% (6211/8267)
edge 63.1% (800/1268) 50.9% (82/161) 58.0% (1043/1799)
fonts 77.3% (1257/1626) 82.7% (129/156) 78.9% (2424/3071)
fssync 86.0% (1609/1872) 85.8% (182/212) 87.1% (2835/3255)
git 70.4% (4462/6334) 68.5% (337/492) 67.2% (6311/9386)
guest 67.3% (6829/10148) 67.0% (488/728) 66.6% (8935/13416)
lsp 78.7% (3573/4542) 80.8% (336/416) 76.7% (5408/7054)
proxy 63.3% (1899/3000) 56.6% (184/325) 63.5% (2929/4613)
runtime-dir 93.6% (117/125) 100.0% (14/14) 94.8% (218/230)
sd-notify 73.9% (68/92) 100.0% (6/6) 83.2% (109/131)
server 70.8% (84477/119323) 73.3% (6136/8369) 68.8% (113166/164484)
ssh 66.9% (705/1054) 75.9% (85/112) 66.8% (1099/1645)
terminal-model 49.9% (314/629) 62.3% (38/61) 50.3% (505/1004)
uplink 94.2% (582/618) 92.6% (50/54) 93.1% (1062/1141)
webrtc-forwarder 33.6% (1321/3932) 44.9% (146/325) 36.0% (2279/6336)
webserver 80.7% (1490/1846) 81.1% (193/238) 83.2% (2551/3067)
website 35.1% (355/1012) 34.4% (53/154) 35.8% (607/1694)
xtask 0.0% (0/5149) 0.0% (0/131) 0.0% (0/9157)
yas 88.9% (28011/31522) 93.9% (2146/2286) 84.0% (43995/52388)
Total 66.5% (167273/251536) 69.5% (13249/19069) 64.9% (236920/365242)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant