Remove dead code, orphaned files, and unused config entries (#67664)

## Summary

Removes code, files and config entries that nothing in the repository
uses. Follow-up to the cleanups in #67126 through #67219. No behavior
changes.

- `project`: removes `SshLspAdapter`, which nothing has constructed
since language server adapters moved to the remote server. Also removes
`RepositorySnapshot::diff_stat_for_path` and its `Repository` wrapper,
`BufferStore::loading_buffers` and
`LocalLspStore::running_language_server_for_id`.
- `git_ui`: removes `move_to_project_path` from `ProjectDiff` and
`DiffMultibuffer`. #67149 removed their last caller.
- `editor`: removes `DisplaySnapshot::reverse_text_chunks` and
`DisplaySnapshot::excerpt_header_height`, and `BlockSnapshot`'s copy of
the excerpt header height, which only the latter read.
- `copilot`: removes the `setEditorInfo`, `notifyAccepted` and
`notifyRejected` request types, which Zed no longer sends.
- Removes unused helpers in `acp_thread`, `agent`, `client`, `collab`,
`fs`, `git`, `markdown`, `settings_ui`, `text`, `ui`, `util` and
`workspace`. `util` drops its `serde_json_lenient` dependency.
- `edit_prediction_cli` drops its library target, which only held a
private module. `cli` drops an uncalled `wait_for_socket` on Linux.
- Deletes orphaned files:
- 12 vim Neovim recordings for tests that were removed or don't use
`NeovimBackedTestContext`
- `script/seed-db`, which runs a removed `collab` subcommand, and
`crates/collab/seed/github_users.json`, which only seeding read
- `script/squawk` and its config, `script/upload-nightly.ps1` and its
helper, and the dev drive scripts, which no workflow or script calls
- `Dockerfile-cross.dockerignore`, `crates/db/README.md` and
`assets/themes/.gitkeep`
- Removes config entries for things that no longer exist: typos excludes
and an ignore pattern, a clippy entry for the removed `cocoa` crate,
license clarifications for crates no longer in `Cargo.lock`, `ci.yml`
references in actionlint and `check-todos`, AGENTS.md links to deleted
crash tooling, a dependency line in the `new-crate` template for a crate
that no longer exists, and the unread `repl.output_max_width_columns`
default with its docs.

### Suggested AGENTS.md additions

> For `crates/vim`: `NeovimBackedTestContext` reads `test_data/<test
name>.json`. When you remove or rename a Neovim-backed test, delete or
rename its recording too; nothing flags orphaned recordings.

## Testing

- No references to the removed items, files or settings key remain in
the tree, including in other platforms' cfg-gated code, docs and
scripts.
- `./script/clippy`
- `cargo check --workspace --all-targets` with `-D warnings`, with
default features and with `--all-features`
- `cargo fmt --all -- --check`
- `cargo test -p xtask -- workspace::`
- `cargo test -p vim -p util -p git -p text -p markdown -p fs`

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.

Release Notes:

- N/A
This commit is contained in:
Parker Loflin
2026-11-30 21:06:49 +00:00
committed by GitHub
parent b2b7331710
commit eadffde6e9
58 changed files with 7 additions and 2041 deletions
-1
View File
@@ -5,7 +5,6 @@ set -euo pipefail
# Brackets are used around characters so these don't show up in normal search.
pattern='tod[o]!|FIXM[E]'
result=$(git grep --no-color --ignore-case --line-number --extended-regexp -e $pattern -- \
':(exclude).github/workflows/ci.yml' \
':(exclude)*criteria.md' \
':(exclude)*prompt.md' || true)
if [[ -n "${result}" ]]; then
-22
View File
@@ -1,22 +0,0 @@
param (
[Parameter(Mandatory = $true)]
[int]$MAX_SIZE_IN_GB
)
$ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true
$ProgressPreference = "SilentlyContinue"
if (-Not (Test-Path -Path "target")) {
Write-Host "target directory does not exist yet"
exit 0
}
$current_size_gb = (Get-ChildItem -Recurse -Force -File -Path "target" | Measure-Object -Property Length -Sum).Sum / 1GB
Write-Host "target directory size: ${current_size_gb}GB. max size: ${MAX_SIZE_IN_GB}GB"
if ($current_size_gb -gt $MAX_SIZE_IN_GB) {
Write-Host "Dev drive is almost full, increase the size first!"
exit 1
}
-68
View File
@@ -1,68 +0,0 @@
function UploadToBlobStoreWithACL {
param (
[string]$BucketName,
[string]$FileToUpload,
[string]$BlobStoreKey,
[string]$ACL
)
# Format date to match AWS requirements
$Date = (Get-Date).ToUniversalTime().ToString("r")
# Note: Original script had a bug where it overrode the ACL parameter
# I'm keeping the same behavior for compatibility
$ACL = "public-read"
$ContentType = "application/octet-stream"
$StorageClass = "STANDARD"
# Create string to sign (AWS S3 compatible format)
$StringToSign = "PUT`n`n${ContentType}`n${Date}`nx-amz-acl:${ACL}`nx-amz-storage-class:${StorageClass}`n/${BucketName}/${BlobStoreKey}"
# Generate HMAC-SHA1 signature
$HMACSHA1 = New-Object System.Security.Cryptography.HMACSHA1
$HMACSHA1.Key = [System.Text.Encoding]::UTF8.GetBytes($env:DIGITALOCEAN_SPACES_SECRET_KEY)
$Signature = [System.Convert]::ToBase64String($HMACSHA1.ComputeHash([System.Text.Encoding]::UTF8.GetBytes($StringToSign)))
# Upload file using Invoke-WebRequest (equivalent to curl)
$Headers = @{
"Host" = "${BucketName}.nyc3.digitaloceanspaces.com"
"Date" = $Date
"Content-Type" = $ContentType
"x-amz-storage-class" = $StorageClass
"x-amz-acl" = $ACL
"Authorization" = "AWS ${env:DIGITALOCEAN_SPACES_ACCESS_KEY}:$Signature"
}
$Uri = "https://${BucketName}.nyc3.digitaloceanspaces.com/${BlobStoreKey}"
# Read file content
$FileContent = Get-Content $FileToUpload -Raw -AsByteStream
try {
Invoke-WebRequest -Uri $Uri -Method PUT -Headers $Headers -Body $FileContent -ContentType $ContentType -Verbose
Write-Host "Successfully uploaded $FileToUpload to $Uri" -ForegroundColor Green
}
catch {
Write-Error "Failed to upload file: $_"
throw $_
}
}
function UploadToBlobStorePublic {
param (
[string]$BucketName,
[string]$FileToUpload,
[string]$BlobStoreKey
)
UploadToBlobStoreWithACL -BucketName $BucketName -FileToUpload $FileToUpload -BlobStoreKey $BlobStoreKey -ACL "public-read"
}
function UploadToBlobStore {
param (
[string]$BucketName,
[string]$FileToUpload,
[string]$BlobStoreKey
)
UploadToBlobStoreWithACL -BucketName $BucketName -FileToUpload $FileToUpload -BlobStoreKey $BlobStoreKey -ACL "private"
}
-11
View File
@@ -1,11 +0,0 @@
excluded_rules = [
# We use `serial` already, no point changing now.
"prefer-identity",
# We store timestamps in UTC, so we don't care about the timezone.
"prefer-timestamptz",
"prefer-big-int",
"prefer-bigint-over-int",
]
pg_version = "15.0"
-12
View File
@@ -23,18 +23,6 @@ accepted = [
"CDLA-Permissive-2.0",
]
[procinfo.clarify]
license = "MIT"
[[procinfo.clarify.files]]
path = 'LICENSE.md'
checksum = '37db33bbbd7348969eda397b89a16f252d56c1ca7481b6ccaf56ccdcbab5dcca'
[webpki.clarify]
license = "ISC" # It actually says 'ISC-style' but I don't know the SPDX expression for that.
[[webpki.clarify.files]]
path = 'LICENSE'
checksum = '5b698ca13897be3afdb7174256fa1574f8c6892b8bea1a66dd6469d3fe27885a'
[fuchsia-cprng.clarify]
license = "BSD-3-Clause"
[[fuchsia-cprng.clarify.files]]
-1
View File
@@ -65,7 +65,6 @@ ui.workspace = true
util.workspace = true
# Uncomment other workspace dependencies as needed
# assistant.workspace = true
# client.workspace = true
# project.workspace = true
# settings.workspace = true
-4
View File
@@ -1,4 +0,0 @@
#!/usr/bin/env bash
set -e
cargo run -p collab migrate
-39
View File
@@ -1,39 +0,0 @@
# Configures a drive for testing in CI.
# Currently, total CI requires almost 45GB of space, here we are creating a 100GB drive.
$Volume = New-VHD -Path C:/zed_dev_drive.vhdx -SizeBytes 100GB |
Mount-VHD -Passthru |
Initialize-Disk -Passthru |
New-Partition -AssignDriveLetter -UseMaximumSize |
Format-Volume -DevDrive -Confirm:$false -Force
$Drive = "$($Volume.DriveLetter):"
# Designate the Dev Drive as trusted
# See https://learn.microsoft.com/en-us/windows/dev-drive/#how-do-i-designate-a-dev-drive-as-trusted
fsutil devdrv trust $Drive
# There is no virus on the Dev Drive!
# Windows Defender is the wolf in antivirus wool, slowing your PC like a digital fool!
# See https://learn.microsoft.com/en-us/windows/dev-drive/#how-do-i-configure-additional-filters-on-dev-drive
fsutil devdrv enable /disallowAv
# Remount so the changes take effect
Dismount-VHD -Path C:/zed_dev_drive.vhdx
Mount-VHD -Path C:/zed_dev_drive.vhdx
# Show some debug information
Write-Output $Volume
Write-Output "Using Dev Drive at $Drive"
# Move Cargo to the dev drive
New-Item -Path "$($Drive)/.cargo/bin" -ItemType Directory -Force
Copy-Item -Path "C:/Users/runneradmin/.cargo/*" -Destination "$($Drive)/.cargo/" -Recurse -Force
Write-Output `
"DEV_DRIVE=$($Drive)" `
"RUSTUP_HOME=$($Drive)/.rustup" `
"CARGO_HOME=$($Drive)/.cargo" `
"ZED_WORKSPACE=$($Drive)/zed" `
"PATH=$($Drive)/.cargo/bin;$env:PATH" `
>> $env:GITHUB_ENV
-32
View File
@@ -1,32 +0,0 @@
#!/usr/bin/env bash
# Squawk is a linter for database migrations. It helps identify dangerous patterns, and suggests alternatives.
# Squawk flagging an error does not mean that you need to take a different approach, but it does indicate you need to think about what you're doing.
# See also: https://squawkhq.com
set -e
if [ -z "$GITHUB_BASE_REF" ]; then
echo 'Not a pull request, skipping squawk modified migrations linting'
exit
fi
SQUAWK_VERSION=0.26.0
SQUAWK_BIN="./target/squawk-$SQUAWK_VERSION"
SQUAWK_ARGS="--assume-in-transaction --config script/lib/squawk.toml"
pkgutil --pkg-info com.apple.pkg.RosettaUpdateAuto || /usr/sbin/softwareupdate --install-rosetta --agree-to-license
# When bootstrapping a brand new CI machine, the `target` directory may not exist yet.
mkdir -p "./target"
curl -L -o "$SQUAWK_BIN" "https://github.com/sbdchd/squawk/releases/download/v$SQUAWK_VERSION/squawk-darwin-x86_64"
chmod +x "$SQUAWK_BIN"
if [ -n "$SQUAWK_GITHUB_TOKEN" ]; then
export SQUAWK_GITHUB_REPO_OWNER=$(echo $GITHUB_REPOSITORY | awk -F/ '{print $1}')
export SQUAWK_GITHUB_REPO_NAME=$(echo $GITHUB_REPOSITORY | awk -F/ '{print $2}')
export SQUAWK_GITHUB_PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
$SQUAWK_BIN $SQUAWK_ARGS upload-to-github $(git diff --name-only origin/$GITHUB_BASE_REF...origin/$GITHUB_HEAD_REF 'crates/collab/migrations/*.sql' 'crates/collab/migrations_llm/*.sql')
else
$SQUAWK_BIN $SQUAWK_ARGS $(git ls-files --others crates/collab/migrations/*.sql crates/collab/migrations_llm/*.sql) $(git diff --name-only main crates/collab/migrations/*.sql crates/collab/migrations_llm/*.sql)
fi
-33
View File
@@ -1,33 +0,0 @@
[CmdletBinding()]
Param(
[Parameter()][string]$Architecture
)
# Based on the template in: https://docs.digitalocean.com/reference/api/spaces-api/
$ErrorActionPreference = "Stop"
. "$PSScriptRoot\lib\blob-store.ps1"
. "$PSScriptRoot\lib\workspace.ps1"
ParseZedWorkspace
Write-Host "Uploading nightly for target: $target"
$bucketName = "zed-nightly-host"
$releaseVersion = & "$PSScriptRoot\get-crate-version.ps1" zed
$version = "$releaseVersion+nightly.$env:GITHUB_RUN_NUMBER.$env:GITHUB_SHA"
$remoteServerFiles = Get-ChildItem -Path "target" -Filter "zed-remote-server-windows-*.zip" -Recurse -File -ErrorAction SilentlyContinue
foreach ($file in $remoteServerFiles) {
UploadToBlobStore -BucketName $bucketName -FileToUpload $file.FullName -BlobStoreKey "nightly/$($file.Name)"
UploadToBlobStore -BucketName $bucketName -FileToUpload $file.FullName -BlobStoreKey "$version/$($file.Name)"
Remove-Item -Path $file.FullName -ErrorAction SilentlyContinue
}
UploadToBlobStore -BucketName $bucketName -FileToUpload "target/Zed-$Architecture.exe" -BlobStoreKey "nightly/Zed-$Architecture.exe"
UploadToBlobStore -BucketName $bucketName -FileToUpload "target/Zed-$Architecture.exe" -BlobStoreKey "$version/Zed-$Architecture.exe"
Remove-Item -Path "target/Zed-$Architecture.exe" -ErrorAction SilentlyContinue
$version | Out-File -FilePath "target/latest-sha" -NoNewline
UploadToBlobStore -BucketName $bucketName -FileToUpload "target/latest-sha" -BlobStoreKey "nightly/latest-sha-windows"
Remove-Item -Path "target/latest-sha" -ErrorAction SilentlyContinue