Skip to content

feat(zed): the extension installs from zed's registry and downloads its series' payload where no server is named - #94

Closed
Sunrisepeak wants to merge 4 commits into
mainfrom
feat/zed-registry
Closed

Sunrisepeak wants to merge 4 commits into
mainfrom
feat/zed-registry

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Owner

Summary

Closes #93. The Zed extension meets the requirements of Zed's extension registry (zed-industries/extensions), so that it can be submitted there; the submission itself is a pull request a person opens in that repository (its AI policy admits no autonomous agent), and docs/92-release.md now says how.

  • Id mcppls-language-server: the registry asks an extension that provides only a language server for a -language-server or -lsp suffix, and an id never changes once published. The server's name in Zed's settings stays mcppls.
  • License editors/zed/LICENSE, the repository's Apache-2.0: the registry reads the extension's own directory, not the repository's root.
  • Where the server comes from (resolve.rs, lib.rs): lsp.mcppls.binary in Zed's settings (Zed's own way to name a server), else mcppls on PATH, else the payload of the extension's series, mcppls-payload-X.Y.0.tar.gz of the release vX.Y.0 (the one release of a series with every asset), downloaded once into the work directory Zed gives the extension, with Zed's installation status shown while it downloads and a failure naming the release and the remedy. The fallback to <user data>/mcppls/payload is gone: an install from the registry does not have it, and the extension, which cannot look outside its work directory, could not tell whether it was there.
  • devtools links the extension under the new id and removes an install under the former id mcppls (when it is a link or this extension), so that Zed does not run two extensions with one server.
  • Version zed 0.23.1 (version --bump zed); CHANGELOG ## [zed 0.23.1].
  • Docs: editors/zed/README.md (install from the extensions page, naming a server, from this checkout), docs/10-editors.md, docs/00-install.md and their zh-CN pages, and docs/92-release.md "Zed's extension registry": the registry's rules, how each is met here, and the four steps of a submission.

What ran

  • cargo test in editors/zed: 8 passed (the order of sources, the series' release, each platform's runner, the errors, stale payloads).
  • cargo build --release --target wasm32-wasip2 with Rust 1.90, the registry's toolchain: no warning.
  • The registry's own checks, run from a checkout of zed-industries/extensions: its license check finds editors/zed/LICENSE accepted; validateManifest and validateExtensionsToml pass for mcppls-language-server 0.23.1; its zed-extension CLI (the SHA its CI pins) packages the directory: provides: ["language-servers"].
  • mcpp test -p devtools: passed, including the new case "the install under the former id goes, and an unrelated one under that id stays"; devtools check all and version --check pass.
  • A real Zed 1.29.3 (xlings' zed), Linux x86_64, under Xvfb with lavapipe, the packaged extension unpacked under extensions/installed/mcppls-language-server as the registry installs it, PATH /usr/bin:/bin (no mcppls), no lsp settings, on the inferred fixture: the extension downloaded mcppls-payload-0.23.0 into extensions/work/mcppls-language-server/, Zed started its runner and image, and the server started the payload's clangd 23.1.0-mcppls.12 and built std and hello.greet:detail for src/greet/greet.cppm.
  • Not run: macOS and Windows in a real Zed (the download path is the same code; the runner's name differs, covered by cargo test).

…ts series' payload where no server is named

Zed's registry (zed-industries/extensions) asks an extension that provides a language
server only for an id ending in -language-server, a license in the extension's own
directory, and a server that is downloaded or found rather than bundled. The extension
is now mcppls-language-server with editors/zed/LICENSE, and starts the server named by
lsp.mcppls.binary, else an mcppls on PATH, else the payload of its series
(mcppls-payload-X.Y.0.tar.gz of vX.Y.0), downloaded once into its work directory. It
no longer starts the payload under the user data directory, which an install from the
registry does not have and which the extension cannot check. devtools links the
extension under the new id and removes an install under the former one. zed 0.23.1.

Closes #93.
… its arguments alone, so they include serve

Measured in Zed 1.29.3: a command named there without arguments was started with none.
…e checks follow the new id

The review of #94 found:
- release-checks.yml still looked for installed/mcppls, which every release candidate would have
  failed, and checked its removal vacuously;
- the extension always downloaded vX.Y.0, so a server patch (server-vX.Y.Z, which carries the
  payload) never reached Zed. It now names its server, SERVER in resolve.rs, as the VS Code and
  CLion packages carry theirs, and a server patch reaches Zed with the extension's next patch;
- a download cut short could leave a runner that exists but is not whole: a marker written after the
  check now says the payload is complete;
- the former-id cleanup decided by the id, which Zed's directory name always matches: it now
  removes only a link or an install whose repository is this one;
- zed-unit built with the runner's Rust: it now uses ZED_RUST_VERSION, the registry's 1.90;
- docs, the release manifest and comments that still described the payload under the user data
  directory as Zed's.
@speak-agent

Copy link
Copy Markdown
Contributor

After review

  • release-checks.yml checks installed/mcppls-language-server (it would have failed every release candidate) and its removal.
  • The extension names the server it downloads, SERVER in resolve.rs (0.23.0): vX.Y.0 for a series server, server-vX.Y.Z for a server patch, which carries the payload. A server patch reaches Zed with the extension's next patch, as it reaches VS Code and CLion in their packages.
  • A marker written after the payload is checked; a directory without it is downloaded again.
  • The former-id cleanup removes only a link or an install whose repository is this one (Zed names the directory by the id, so the id proved nothing).
  • zed-unit builds with ZED_RUST_VERSION (1.90, the registry's).
  • Docs, packaging/release.manifest.json and comments that still described the user-data payload as Zed's.
  • Rerun: cargo test 9 passed; devtools tests and check all pass; a real Zed 1.29.3 again downloaded mcppls-payload-0.23.0 (marker v0.23.0) and built the fixture's modules.

…'s and the VS Code Marketplace's name

mcppls-language-server repeated the abbreviation of the suffix the registry asks for; the
repository and the VS Code Marketplace already name the product mcpp-language-server.
@speak-agent

Copy link
Copy Markdown
Contributor

The id is mcpp-language-server

mcppls-language-server repeated the abbreviation of the -language-server suffix the registry asks for. The extension now takes the name the product already has: this repository's, and the VS Code Marketplace's (sunrisepeak.mcpp-language-server). The server's name in Zed's settings stays mcppls.

Rerun:

  • cargo test: 9 passed.
  • devtools tests: 6 passed. check all and version --check pass.
  • The registry's license, manifest and extensions.toml checks pass for mcpp-language-server 0.23.1.
  • The registry's CLI packages the directory.
  • A real Zed 1.29.3: the packaged extension, installed under extensions/installed/mcpp-language-server, downloaded mcppls-payload-0.23.0 (marker v0.23.0) and built the fixture's modules.

About the earlier ux (ux-mcpp) failure (engine share of cold completions 0.88 against a budget of 0.90): this pull request changes no server code. main failed the same job on 2026-11-21 (run 44885219472) on another check. This push reruns it.

@speak-agent

Copy link
Copy Markdown
Contributor

Closed: the Zed extension stays in this repository (editors/zed, installed as a dev extension) and is not submitted to Zed's extension registry, so the registry's id, license and server-download requirements this pull request met are not needed. The branch is kept.

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.

The Zed extension can be published to Zed's extension registry

2 participants