zed/script
Anthony Eid 73c574beb7 benchmarks: Stop requesting settings' test-support feature
`crates/benchmarks/Cargo.toml` requested `settings`'s `test-support` feature directly so `display_map.rs`, `editor_render.rs`, and `markdown_renderer.rs` could each call `SettingsStore::test` to build the global `SettingsStore` they render against. `test-support` is a much wider surface than that one call needs: it also enables `gpui/test-support` and `fs/test-support`, and (per `settings`'s own crate) exposes settings-file mutation APIs meant for interactive tests, not benchmarks. This removes that direct edge by giving `settings` a narrow `benchmarks` feature that exposes exactly the initializer these three benchmarks need, with the same settings content as before.

`settings::src::settings_file.rs` already built its `test_settings()` content (default settings overridden with a deterministic monospace font, `empty-theme`, and `format_on_save: on`) entirely from production APIs (`default_settings()`, `parse_json_with_comments`, `util::merge_non_null_json_value_into`); the only reason it needed `test-support` was the `#[cfg(...)]` gate on the function itself. I extracted that body into a private `deterministic_font_and_theme_settings()` helper and added a sibling `benchmark_settings()` accessor that calls the same helper, gated on `feature = "benchmarks"` instead. `SettingsStore` gets a matching `SettingsStore::benchmarks(cx)` constructor next to `SettingsStore::test`, built the same way from `benchmark_settings()`. `settings`'s new `benchmarks = []` feature enables nothing else, so it cannot re-enable `gpui/test-support` or `fs/test-support` transitively, and it exposes no mutation API (`update_user_settings` stays gated to `test`/`test-support` only).

Because `benchmark_settings()` and `test_settings()` call the exact same helper function, their content is guaranteed byte-identical rather than merely intended to match, so switching `display_map`/`editor_render`/`markdown_renderer` over does not change the font, size, or theme fallback those benchmarks measure. I confirmed this is a true no-op for the theme in particular: `empty-theme` is never registered under the `LoadThemes::JustBase` these benchmarks use, so `theme_settings::configured_theme` already fell back silently to the same default theme it would use for any unrecognized name; only the font settings (Courier/Courier New at 14px) are load-bearing, and those are now sourced identically to before. `crates/settings/src/settings_store.rs` gains a `#[cfg(feature = "benchmarks")]` test, `test_benchmark_settings_match_test_settings`, that asserts the string equality directly and reads back `buffer_font_family`/`buffer_font_size`/`ui_font_family`/`ui_font_size`/`theme` from a real `SettingsStore::benchmarks(cx)` to confirm the representative settings a rendering benchmark reads still resolve as expected.

`crates/benchmarks/Cargo.toml` now requests `settings`'s `benchmarks` feature instead of `test-support`, and the three bench files call `SettingsStore::benchmarks(cx)` instead of `SettingsStore::test(cx)` — their only change. `cargo tree -p benchmarks --edges features --invert settings` before this change showed `benchmarks` as a direct dependent of `settings feature "test-support"`; after this change that direct edge is gone, and `benchmarks` instead is a direct dependent of `settings feature "benchmarks"`.

`settings/test-support` is not fully gone from `benchmarks`' resolved graph, and cannot be in this scope: `language/test-support` (needed directly by `markdown_renderer.rs`'s `LanguageRegistry::test`/`language::rust_lang`, with no production equivalent) enables `settings/test-support` itself, so it still resolves transitively through `language`. This is the same shape as the existing `theme`/`util` debt this script already tracked, so I folded `settings` into that same loop (`for foundational_crate in theme util settings`) instead of inventing a new check shape, and updated its comments to describe `language`/`multi_buffer` as the remaining crates keeping `test-support` populated in the graph. I also added a second, positive assertion that `benchmarks` still resolves `settings feature "benchmarks"`, so a future edit can't silently drop that feature request and have these three benchmarks start reading unrelated plain-default settings without any isolation check catching it. `edit_file_tool_benchmarks` (the sibling package `edit_file_tool.rs` lives in, added in #63048) is unchanged and explicitly excluded from all of this: it still needs `settings/test-support` for `SettingsStore::update_user_settings`, which has no production-capable equivalent for mutating already-loaded settings content, and the script's existing sanity check for that package's continued existence is untouched.

Testing performed:
- `cargo tree -p settings --no-default-features --features benchmarks -e no-dev --edges features`: no `test-support` edge anywhere, confirming the `benchmarks` feature alone enables nothing test-only.
- `cargo tree -p benchmarks --edges features --invert settings` before/after: the direct `test-support` edge from `benchmarks` is gone; only the transitive edge through `language feature "test-support"` remains. A direct edge to `settings feature "benchmarks"` is now present instead.
- `cargo check -p settings --no-default-features --features benchmarks`: compiles cleanly standalone.
- `cargo test -p settings --lib` (default features) and `cargo test -p settings --features benchmarks --lib`: 32 and 33 tests pass respectively, including the new `test_benchmark_settings_match_test_settings`.
- `cargo check -p benchmarks --benches` and `cargo check -p edit_file_tool_benchmarks --benches`: both compile cleanly.
- `cargo bench -p benchmarks --bench display_map/--bench editor_render/--bench markdown_renderer -- --test` (quick mode): all cases across all three targets report Success, including the headless-renderer-backed `editor_render`/`markdown_render` cases.
- `script/check-gpui-bench-feature-isolation`: passes; manually confirmed it fails (correctly) when `settings`'s Cargo.toml entry is reverted to `test-support` and separately when its `benchmarks` feature request is dropped entirely.
- `script/shellcheck-scripts` and `cargo fmt --check` (whole repo) both pass.
- `./script/clippy -p settings -p benchmarks -p edit_file_tool_benchmarks` (release, all features, deny warnings) passes, including `cargo shear --locked --deny-warnings`.

Remaining debt, tracked honestly rather than hidden: `language` and `multi_buffer` still request `test-support` directly (for `LanguageRegistry::test`/`language::rust_lang` and `MultiBuffer::build_simple`/`build_random`, none of which have a production equivalent), which keeps `settings/test-support` and `gpui/test-support` resolved transitively in `benchmarks`' graph regardless of this change. `edit_file_tool_benchmarks` is unaffected and continues to depend on `test-support` from `agent`, `editor`, `language`, `language_model`, `lsp`, `project`, and `settings` for its fake-project agent-tool harness, as documented since #63048.

Release Notes:

- N/A
2026-08-21 17:28:06 -04:00
..
danger Update .rules to prompt for self-review before submitting PR (#62945) 2026-08-21 10:32:14 +00:00
flatpak Add (flatpak) and (snap) suffixes to Zed version in system info (#32903) 2025-06-17 20:39:35 +00:00
lib gpui: Fix typo in publish script (#39836) 2025-10-09 05:11:11 +00:00
licenses cloud_api_client: Implement Wasm support (#61328) 2026-07-21 13:20:31 +00:00
terms legal: Use absolute URLs for Terms of Service and Privacy Policy links (#62684) 2026-08-17 09:35:54 +00:00
update_top_ranking_issues Update issue ranking script dependencies (#60345) 2026-07-07 12:49:19 +00:00
analyze_highlights.py Use a proper name for highlights.scm (#43412) 2025-11-24 16:15:38 +00:00
bootstrap collab: Add automatic install of minio deb or rpm to script/bootstrap (#32968) 2025-06-18 19:07:57 +00:00
bootstrap.ps1 windows: Make collab run on Windows (#23117) 2025-01-17 09:39:13 +02:00
build-docker Support More Linux (#18480) 2024-09-30 17:46:21 -04:00
bump-extension-cli Enforce adding a message to extension CLI bumps (#58786) 2026-06-10 23:51:59 +00:00
bump-gpui-version gpui: Update dependency package names (#40143) 2025-10-14 04:43:28 +00:00
bump-nightly ci: Build nightly more frequently (#53800) 2026-05-15 09:08:55 +00:00
bump-zed-version ci: Add workflow for bumping Zed versions (#54485) 2026-04-23 00:56:18 +02:00
bundle-freebsd linux: Make desktop file executable (#35597) 2025-08-04 15:35:19 -04:00
bundle-linux Stop bundling GLib in Linux release archives (#61593) 2026-08-20 10:20:14 +00:00
bundle-mac Remove unnused line from bundle-mac (#48972) 2026-02-11 21:33:01 -07:00
bundle-windows.ps1 Mimic macOS bundling behavior for Windows builds (#61180) 2026-07-17 09:01:06 +00:00
cargo Better cargo wrapper (#49946) 2026-02-24 05:13:04 +00:00
cargo-timing-info.js Add a cargo wrapper to report build times (#49632) 2026-02-23 09:46:28 -07:00
check-gpui-bench-feature-isolation benchmarks: Stop requesting settings' test-support feature 2026-08-21 17:28:06 -04:00
check-keymaps Remove more storybook leftovers (#60337) 2026-07-03 08:27:48 +00:00
check-licenses Relicense Zed source code under GPL (#57948) 2026-05-28 20:19:17 +00:00
check-links ci: Restore lychee link check. Only validate internal links (#32463) 2025-06-10 11:20:07 -04:00
check-todos Add CI check that cmd- is not in linux keymaps + check other mods (#32334) 2025-06-08 09:34:07 +00:00
cherry-pick Remove cherry-pick-bot config (#59703) 2026-06-22 13:00:51 +00:00
clear-target-dir-if-larger-than ci: Clean workspace members more eagerly (#53427) 2026-04-09 00:21:02 +02:00
clear-target-dir-if-larger-than.ps1 ci: Clean workspace members more eagerly (#53427) 2026-04-09 00:21:02 +02:00
clippy Switch from cargo-machete to cargo-shear (#62643) 2026-08-20 10:08:48 +00:00
clippy.ps1 Windows tests on self-hosted runners (#29764) 2025-06-16 17:29:36 -04:00
collab-flamegraph Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
community-pr-track-mapping.json Add new area labels to community PR track mapping (#62314) 2026-08-07 11:11:10 +00:00
crate-dep-graph Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
create-draft-release Avoid re-creating releases when re-running workflows (#42573) 2025-11-12 21:50:15 -07:00
debug-cli cli: Allow opening non-existent paths (#43250) 2025-11-24 11:30:19 +02:00
deploy-collab Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
determine-release-channel Fix bad quote in script/determine-release-channel (#20613) 2024-11-13 12:41:50 -05:00
determine-release-channel.ps1 windows: Publish nightly (#24800) 2025-07-09 08:57:03 +08:00
digital-ocean-db.sh Add a script to connect to the database. (#32023) 2025-06-04 09:23:23 -06:00
docs-strip-preview-callouts Fix and improve docs automation scripts (#50120) 2026-02-25 19:02:37 -06:00
docs-suggest Improve agent pull request hygiene (#49469) 2026-02-18 08:46:47 -06:00
docs-suggest-publish git_graph: Remove feature flag (#52972) 2026-04-02 15:26:37 +00:00
download-wasi-sdk Add more harness to the CI scripts (#53816) 2026-04-13 22:28:20 +03:00
draft-release-notes Add fallback message when preview changelog is empty (#46260) 2026-01-07 14:24:02 +00:00
drop-test-dbs Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
exit-ci-if-dev-drive-is-full.ps1 windows: Fix tests on Windows (#22616) 2025-02-05 14:30:09 +00:00
freebsd Fix capitalization of libX11 in FreeBSD dependencies (#48159) 2026-02-02 23:55:03 +01:00
generate-action-metadata Remove zed dependency from docs_preprocessor (#45130) 2025-12-18 21:59:05 -05:00
generate-licenses Pin cargo-about to 0.8.2 (#44012) 2025-12-02 17:54:08 +00:00
generate-licenses-csv Pin cargo-about to 0.8.2 (#44012) 2025-12-02 17:54:08 +00:00
generate-licenses.ps1 Fail windows bundle when cargo about fails (#48056) 2026-01-30 19:55:29 -07:00
generate-terms-rtf Fix invalid Unicode in terms & conditions (#42906) 2025-11-19 13:00:35 -05:00
get-crate-version Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
get-crate-version.ps1 windows: Publish nightly (#24800) 2025-07-09 08:57:03 +08:00
get-pull-requests-since Add a get-release-notes-since script (#18445) 2024-09-27 10:59:19 -04:00
get-release-notes-since Add a get-release-notes-since script (#18445) 2024-09-27 10:59:19 -04:00
get-released-version Use cloud.zed.dev for install.sh (#42399) 2025-11-10 23:55:19 +00:00
github-assign-contributor-issue.py Add a broken POC for guild auto-assignment (#55205) 2026-04-29 13:59:31 +00:00
github-check-new-issue-for-duplicates.py Duplicate Bot: Improve candidate retrieval (v6) (#62011) 2026-07-31 15:45:04 +00:00
github-clean-issue-types.py Add a one-off cleanup script for GH issue types (#42515) 2025-11-12 11:40:31 +01:00
github-community-pr-board.py Add Guild board automation (#60266) 2026-07-02 09:46:22 +00:00
github-find-top-duplicated-bugs.py Post comments on duplicate bug reports (#49482) 2026-02-18 17:15:15 +00:00
github-guild-board.py Guild board automation: fix In Progress status moves (#61115) 2026-07-16 16:17:01 +00:00
github-pr-cleanup.py Automate cleanup of unsigned and stale draft pull requests (#62936) 2026-08-21 07:53:28 +00:00
github-pr-status A script to help with PR naggery (#32025) 2025-06-04 09:23:14 -06:00
github-track-duplicate-bot-effectiveness.py Duplicate Bot: Improve candidate retrieval (v6) (#62011) 2026-07-31 15:45:04 +00:00
github-triage-queue-board.py Fix triage queue board matching every open issue (#61993) 2026-07-31 12:44:52 +00:00
histogram
import-themes Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
install-cmake Improve install-cmake script (#20836) 2024-11-18 16:39:57 -05:00
install-linux Fix install linux (#43205) 2025-11-21 09:12:19 -07:00
install-rustup.ps1 Windows tests on self-hosted runners (#29764) 2025-06-16 17:29:36 -04:00
install.sh Stop bundling GLib in Linux release archives (#61593) 2026-08-20 10:20:14 +00:00
kube-shell Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
linux Fix gentoo cmake package name (#60930) 2026-07-14 13:56:45 +00:00
metal-debug Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
mitm-proxy.sh Improve script/mitm-proxy.sh to support podman (#25834) 2025-02-28 22:37:03 +00:00
new-crate Relicense Zed source code under GPL (#57948) 2026-05-28 20:19:17 +00:00
prettier Improve autofix (#44930) 2025-12-15 22:19:18 -07:00
prompts Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
randomized-test-ci
randomized-test-minimize
remote-server Add remote server cross compilation (#19136) 2024-10-12 23:23:56 -07:00
reset_db Fix reset_db script (#29067) 2025-04-18 19:28:14 +00:00
run-background-agent-mvp-local Update AI docs for retired hosted models (#49486) 2026-02-18 10:36:38 -06:00
run-local-minio collab: Add automatic install of minio deb or rpm to script/bootstrap (#32968) 2025-06-18 19:07:57 +00:00
run-unit-evals Fetch the unit eval commit before checking it out (#42636) 2025-11-13 15:21:53 +00:00
seed-db Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
select-sentry-crash-candidates background-agent: Scaffold week-one crash MVP pipeline (#49299) 2026-02-16 20:32:51 -06:00
sentry-fetch Add prompts and scripts for automatic crash repro and fix (#49063) 2026-02-12 12:42:41 -08:00
setup-dev-driver.ps1 windows: Use dev drive instead of ReFS (#25858) 2025-03-01 22:43:10 +08:00
setup-sccache Improve sccache cache reuse (#60968) 2026-07-15 20:35:16 +00:00
setup-sccache.ps1 Improve sccache cache reuse (#60968) 2026-07-15 20:35:16 +00:00
shellcheck-scripts ci: Add shellcheck for scripts (#20631) 2024-11-18 16:41:22 -05:00
snap-build Add scripts and configuration for building snap package (#25064) 2025-02-19 10:28:23 -07:00
snap-try Add scripts and configuration for building snap package (#25064) 2025-02-19 10:28:23 -07:00
squawk ACP debug tools pane (#36768) 2025-08-22 19:32:49 +00:00
test-docs-suggest-batch Add documentation suggestion automation (#49194) 2026-02-18 06:39:09 -06:00
test-wsl-sandbox.ps1 Add Windows terminal sandboxing via WSL (#58971) 2026-06-17 21:07:29 +00:00
triage_watcher.jl Add script/triage_watcher.jl (#45384) 2025-12-19 18:09:40 +00:00
trigger-docs-build script: Trigger docs release (#56953) 2026-05-18 15:35:35 +00:00
trigger-release Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
uninstall.sh Add an uninstall script (#21213) 2024-11-28 10:31:12 +02:00
update-json-schemas Update bundled JSON schemas (2026-04-29) (#58948) 2026-06-25 17:30:12 +00:00
upload-extension-cli
upload-nightly Add more harness to the CI scripts (#53816) 2026-04-13 22:28:20 +03:00
upload-nightly.ps1 Add SSH remote server for Windows (#47460) 2026-01-24 13:15:01 -05:00
verify-macos-document-icon macOS: Bundle placeholder Document.icns so Finder can display Zed file icons (#44833) 2025-12-17 16:42:31 -06:00
what-is-deployed Fix nix build (#26270) 2025-03-10 01:06:11 -07:00
zed-local Fix script/zed-local on Windows (#38832) 2025-09-25 09:03:27 -04:00