feat(zed): publish the Zed extension to a build-gated mirror on release#193
Merged
Conversation
The zed-industries/extensions registry builds extensions standalone from a pinned commit, so shipping Basilisk to Zed needs a self-contained, version-stamped mirror — this adds that release path, mirroring publish-nvim. - scripts/render-zed-mirror.sh renders a standalone tree: vendors basilisk-common, rewrites the workspace path-dep to the vendored copy, makes the mirror its own workspace root, and stamps the version structurally via scripts/set_toml_version.py (tomllib-validated, not blind sed) — [SWR-VERSION-BUILD-STAMPING]. - release.yml gains a publish-zed job that renders the tree, gates the push on a real wasm32-wasip2 build, then pushes and tags the Nimblesite/basilisk-zed mirror (BREW_SCOOP_PAT, same write convention as publish-nvim). - Untrack committed Zed build-artifact drift (extension.wasm, dist/**): both are gitignored and regenerated by every build. - Document the mechanism as [ZED-MIRROR] and fix the binary-download repo slug (basilisk-lang -> Nimblesite) in ZED-SPEC.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Adds the release path that ships the Basilisk Zed extension by rendering a self-contained, WASM-build-gated mirror to
Nimblesite/basilisk-zedon every tag.What Was Added?
scripts/render-zed-mirror.sh— renders the in-repobasilisk-zed/crate into a tree thezed-industries/extensionsregistry can build standalone: vendors the zero-depbasilisk-commonundervendor/, rewrites the workspace path-dependency to the vendored copy, drops workspace-only[lints]inheritance, and appends an empty[workspace]so the mirror is its own workspace root.scripts/set_toml_version.py— atomllib-validated version setter the render script uses to stamp the extensionCargo.toml, the vendored crateCargo.toml, andextension.toml. It parses each file, replaces the single scopedversionline, and re-parses to confirm the result is valid TOML (a structured write, not blindsed).publish-zedjob inrelease.yml— on av*tag it renders the mirror, gates the push on a realcargo build --release --target wasm32-wasip2, then pushes and tagsNimblesite/basilisk-zedusingBREW_SCOOP_PAT(same clone-replace-commit-push-tag convention aspublish-nvim).What Was Changed or Deleted?
basilisk-zed/extension.wasmand the entirebasilisk-zed/dist/**tree (a stale packaged copy: anotherextension.wasm,extension.toml, debug-adapter schema, and tree-sitter.scmqueries). All are already.gitignored and regenerated by every build, so they were removed from version control (the files remain on disk).How Do The Automated Tests Prove It Works?
make cipasses end to end (lint + full Rust test suite & coverage thresholds + release build).cargo build --release --target wasm32-wasip2,cargo clippy, and 96 unit tests (cargo test -p basilisk-zed) pass.render-zed-mirror.shproduces a placeholder-free tree whose standalonewasm32-wasip2build succeeds (basilisk-zed vX.Y.Z→ valid.wasm), including with a SemVer pre-release tag, provingset_toml_version.pystamps all three TOML carriers correctly.ruff format --check,ruff check,cargo fmt --check, and the deslop duplication gate all pass.Spec / Doc Changes
docs/specs/ZED-SPEC.md: new[ZED-MIRROR]section documenting the registry-publish mechanism and the two structural blockers it solves (placeholder version + workspace path-dep), and a fix to the binary-download repo slug in[ZED-DIST](basilisk-lang/basilisk→Nimblesite/Basilisk, matching therelease::GITHUB_REPOconstant the extension actually uses).Breaking Changes