Files
tty7/.github/scripts/install-linux-deps.sh
T
l0ng-ai 0d0969ac56 fix(test): stop closing_the_pool_drops_queued_work racing, and guard i18n placeholders
`closing_the_pool_drops_queued_work` never tested a queued job. `submit`
grows the pool whenever `jobs.len() > idle`, so blocking one worker and
submitting a second job spawns a second worker and runs it immediately —
the assertion only held when `close()` beat a brand-new thread to the state
lock. On a loaded machine it lost that race about one run in six.

A job only stays queued when the pool is saturated, so the test now fills it
to MAX_WORKERS first, asserts the job is on the queue before closing, and
waits for the workers to drain afterwards. 14 consecutive `-p tty7-core --lib`
runs green, against 2 failures in 16 before.

Placeholders in a translation were checked by nobody: `apply_template`
substitutes by name and leaves anything it was not given alone, so a `{name}`
dropped from the zh string reaches the user as a sentence that has simply
stopped naming the host, and an invented one draws braces on screen. Neither
is a missing or empty translation, which is all the parity test could see.
Both are now checked, for the plural and select branches too. Nothing was
wrong today.

The `KEPT_IN_ENGLISH` staleness check printed rather than asserted, and cargo
swallows a passing test's stdout, so the list could only ever grow.

The Linux build dependencies existed in four copies across three workflows;
release and nightly had the AppImage packaging tools (libfuse2, file,
imagemagick) mixed into the same list, which reads as if they were needed to
build. One script now, with the packaging extras installed separately, and the
ci.yml comment points at the docs page that actually documents the list rather
than at the README, which never did.

2931 tests pass.
2026-08-15 18:11:17 +08:00

33 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
# Usage: install-linux-deps.sh
# Install the system packages a Linux build of tty7 needs, and export the
# gssapi backend selection.
#
# gpui resolves its X11/Wayland/xkb/font backends through `pkg-config` at build
# time, so these have to be on the machine before `cargo build` — a missing one
# surfaces as a build-script failure deep in a dependency, not as anything that
# names the package.
#
# It is a script rather than a copy of the list in each job because more than
# one job needs it (`build` and `clippy`), and GitHub Actions workflows have no
# YAML anchors to share it with. Two hand-maintained copies drift, and the way
# that drift shows up is a green `clippy` and a red `build`, or the reverse.
#
# The same list appears once more, deliberately, in
# docs/getting-started/installation.mdx — contributors building from source need
# to *read* it, not run it. Keep the two in step: a contributor following the
# docs should get exactly the build CI reproduces.
set -euo pipefail
sudo apt-get update
sudo apt-get install -y \
pkg-config cmake clang \
libxkbcommon-dev libxkbcommon-x11-dev \
libfontconfig1-dev libfreetype6-dev \
libwayland-dev libx11-dev libxcb1-dev \
libzstd-dev libssl-dev libkrb5-dev
# libgssapi-sys binds a system krb5, and Ubuntu ships MIT rather than Heimdal.
# Without this it guesses, and guesses wrong on the runners.
echo "LIBGSSAPI_IMPL=mit" >> "$GITHUB_ENV"