Compare commits

...
7 Commits
Author SHA1 Message Date
lucioandClaude Fable 5 8d070a4277 Release 0.10.2 — the all-platforms package
ci / checks (push) Successful in 43s
ci / corpus (push) Successful in 19s
release / build-and-publish (push) Successful in 4m11s
Version bump across the four files, the extension page's version
strings, and the changelog: the seventh .vsix carrying every platform's
binaries chosen at runtime, the consolidated seven-package release
flow, and the Marketplace-grade extension page.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-27 02:09:49 -07:00
lucioandClaude Fable 5 64d6e9a55d Marketplace-grade extension page, reviewed and corrected
The editor-marketplace-page round's rewrite of the extension README and
manifest (icon, banner, keywords, capability matrix, PNG artwork with
SVG sources kept out of the package), landed with three lead-review
corrections: the nonexistent lucisv.dev homepage now points at the
repository, the install table regains the universal no-binary fallback
the rewrite dropped, and Troubleshooting documents the duplicate-hover
trap of the pre-rename vfmt extension left installed next to lucisv.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-27 02:03:17 -07:00
lucioandClaude Fable 5 cebb333bd7 All-platforms VSIX + the release flow consolidated in one script
A 7th package, lucisv-<v>-all.vsix, carries every platform's binary
pair under bin/<platform>-<arch>/ and the extension picks the right one
at runtime — flat bin/ (platform package) first, then the platform-arch
subdirectory, then PATH. Target-less on purpose, so Alpine and anything
else vsce refuses to name gets working static binaries. The release.yml
inline prune step moves into tools/prune_release_assets.sh, which now
requires all seven packages by name before anything is published.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-27 02:03:10 -07:00
lucioandClaude Fable 5 0a93143bfb Release 0.10.1 — platform packages for the VS Code extension
ci / checks (push) Successful in 42s
ci / corpus (push) Successful in 19s
release / build-and-publish (push) Successful in 4m12s
Version bump across the four files (package-lock.json's two spots had
drifted since 0.7.2 and are trued up here) and the changelog section:
five platform-specific .vsix packages with the binaries embedded, and a
release page that ships exactly those packages plus the universal
fallback.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-27 01:17:02 -07:00
lucioandClaude Fable 5 ec65e0831f CI release publishes the six extension packages only
ci / checks (push) Successful in 43s
ci / corpus (push) Successful in 20s
Owner decision: the release page carries the .vsix packages (each
platform package checked by name — a missing one fails the release —
plus the universal fallback) and SHA256SUMS, nothing else. The loose
binaries are still built and audited on the runner, since the packages
embed them, but no longer attached; standalone binaries are a cargo
build away. The new workflow step prunes dist/ after the audit and
filters SHA256SUMS to the packages, keeping the audited hashes, then
re-verifies. Prune logic tested against the real 0.10.0 dist with a
missing-package negative control; docs trued up in RELEASING.md, the
top-level README and both feature READMEs.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-27 01:07:34 -07:00
lucioandClaude Fable 5 a399f81ad9 Platform-specific VSIXs: five packages with the binaries inside
ci / checks (push) Successful in 41s
ci / corpus (push) Successful in 19s
release.sh --cross now cuts a .vsix per platform — darwin-arm64,
darwin-x64, linux-x64, linux-arm64 (new aarch64-musl cross target),
win32-x64 — each carrying lucisv and lucisv-server under bin/, staged
transiently with an EXIT trap and content-asserted with unzip. The
extension resolves a user-set lucisv.serverPath, then the bundled
server (chmod'ed on activation; VSIX extraction drops the exec bit),
then PATH; the universal no-binary .vsix stays as the fallback. The
host package's embedded server is smoke-tested out of the zip on every
release. docs/features/editor-platform-vsix has the full round.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-27 00:55:53 -07:00
lucioandClaude Fable 5 20ad318d4e file_ops: the corpus fan-out test skips without corpus/, like its siblings
ci / checks (push) Successful in 52s
ci / corpus (push) Successful in 23s
The round-14 QA probe asserted the corpus's presence instead of
following the house convention, so any checkout that never fetched
corpus/ — a bare CI runner, act — panicked instead of skipping.
Reported by the owner from an act run. Swept the workspace for other
unguarded corpus asserts: every remaining one either guards with the
skip or lives inside an #[ignore]d perf probe.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-27 00:24:44 -07:00
24 changed files with 2030 additions and 292 deletions

No files matched your search

+15 -4
View File
@@ -1,9 +1,15 @@
# Release: pushing a tag `vX.Y.Z` builds every distribution artifact and
# publishes a Gitea release with the CHANGELOG section for that version as
# its notes. The artifact set is exactly what tools/release.sh --cross
# produces: host (Apple Silicon) + x86_64 macOS + static-musl Linux +
# RHEL 8-compatible linux-gnu + Windows binaries for both lucisv and
# lucisv-server, the platform-independent .vsix, and SHA256SUMS.
# its notes. What the release page carries is the seven .vsix packages —
# the universal one, the five (darwin-arm64/darwin-x64/linux-x64/
# linux-arm64/win32-x64) with the lucisv + lucisv-server binaries embedded,
# and the all-platforms one carrying every pair at once — plus SHA256SUMS.
# Every package is a must: a missing one fails the release, by name
# (tools/prune_release_assets.sh). The loose binaries are still built for
# every target
# (the packages are made from them) and still audited, but they are not
# attached: anyone who wants a standalone binary builds it with
# `cargo build --release` (docs/features/editor-platform-vsix).
#
# The release fails, deliberately, when the tag does not match the
# workspace version or CHANGELOG.md has no section for it: every release
@@ -30,6 +36,11 @@ jobs:
echo "tag $GITHUB_REF_NAME does not match crate version $v" >&2
exit 1
}
# The release page ships extension packages only: all seven checked by
# name, SHA256SUMS filtered down to them and re-verified, the loose
# binaries (needed to build and audit the packages) dropped.
- name: Keep only the extension packages
run: tools/prune_release_assets.sh dist "${GITHUB_REF_NAME#v}"
- name: Extract the release notes from CHANGELOG.md
run: tools/release_notes.sh "${GITHUB_REF_NAME#v}" > dist/RELEASE_NOTES.md
- name: Create the release and attach the artifacts
+75
View File
@@ -4,6 +4,81 @@ All notable changes to lucisv are recorded here. Versions follow
[semantic versioning](https://semver.org/); until 1.0 the CLI's exit codes
(see `README.md`) are the only frozen contract.
## 0.10.2 — 2026-08-27
The works-anywhere release: a seventh extension package that carries
**every platform's binaries in one file**, and a Marketplace-grade
extension page.
### The all-platforms package
`lucisv-<version>-all.vsix` embeds all five platforms' `lucisv` and
`lucisv-server` pairs under `bin/<platform>-<arch>/`, and the extension
picks the right pair at runtime from `process.platform` and
`process.arch`. It is deliberately target-less, which makes it the
package for machines the targeted five cannot name: Alpine (VS Code
there asks for an `alpine-*` target, but reports plain `linux` at
runtime, so the static musl binaries just work), mixed fleets, or one
file mirrored internally. The cost is download size — about 13 MB
against 3 MB for a single-platform package — and nothing else. The
resolution order is unchanged: an explicit `lucisv.serverPath` first,
then the bundled binary (flat `bin/` before the platform subdirectory),
then `PATH`. Details: `docs/features/editor-platform-vsix/README.md`.
### One consolidated release flow
The release workflow's publish-only-the-packages logic now lives in
`tools/prune_release_assets.sh`, and it requires **all seven** packages
by name — five platform, `all`, and the universal no-binary fallback —
before anything is published; a missing one fails the release. Every
tagged release follows this same flow with no manual steps beyond the
version bump, the changelog section, and the tag.
### A Marketplace-grade extension page
`editors/vscode/README.md` is rewritten for end users — install matrix,
capability tables, snippet library, settings ladder, troubleshooting —
with an icon and diagrams, and the manifest gains the Marketplace
metadata (icon, banner, keywords, categories). Troubleshooting now also
names the duplicate-hover trap: the pre-rename **vfmt** extension left
installed next to lucisv attaches a second language server, and every
hover and diagnostic shows twice. Uninstall `vfmt` and reload.
## 0.10.1 — 2026-08-27
The install-in-one-step release: the VS Code extension now ships as
**platform-specific packages with the binaries inside**, and the release
page carries exactly those packages — nothing to build, nothing to put on
`PATH`.
### Platform packages for the VS Code extension
Five new `.vsix` packages — `darwin-arm64`, `darwin-x64`, `linux-x64`,
`linux-arm64`, `win32-x64` — each embedding that platform's `lucisv` and
`lucisv-server` under `bin/` inside the extension. Install the one
matching your machine with `code --install-extension` and the extension
spawns its own server; both Linux packages are statically linked (musl),
so they run on any distro, and `linux-arm64` is a **new build target**
altogether. The extension resolves the server as: an explicitly set
`lucisv.serverPath` first, then the bundled binary (made executable on
activation — VSIX extraction drops the bit), then `PATH` — so pointing at
your own `target/release` build still works, and clearing the setting
falls back to the bundled server. The universal `lucisv-<version>.vsix`
(no binaries, server from `PATH`) remains the fallback for platforms
without a package. Details and the verification story:
`docs/features/editor-platform-vsix/README.md`.
### The release page ships packages only
A tagged release now publishes the six `.vsix` files and `SHA256SUMS`,
nothing else. Every platform package is checked by name before publishing
— a missing one fails the release — and the per-platform binaries are
still built and audited (static-linkage, glibc ceiling, file types) since
the packages embed them, but no longer attached as loose assets: a
standalone binary is a `cargo build --release` away. The host package's
embedded server is smoke-tested through a full LSP session, straight out
of the zip, on every release.
## 0.10.0 — 2026-08-27
The audit-complete release: TODO.md §9c, the last section of the LSP
Generated
+8 -8
View File
@@ -97,7 +97,7 @@ dependencies = [
[[package]]
name = "lucisv"
version = "0.10.0"
version = "0.10.2"
dependencies = [
"lucisv_core",
"rayon",
@@ -108,11 +108,11 @@ dependencies = [
[[package]]
name = "lucisv_core"
version = "0.10.0"
version = "0.10.2"
[[package]]
name = "lucisv_server"
version = "0.10.0"
version = "0.10.2"
dependencies = [
"lsp-server",
"lsp-types",
@@ -248,14 +248,14 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
[[package]]
name = "vlog_formatter"
version = "0.10.0"
version = "0.10.2"
dependencies = [
"vlog_parser",
]
[[package]]
name = "vlog_linter"
version = "0.10.0"
version = "0.10.2"
dependencies = [
"vlog_formatter",
"vlog_parser",
@@ -264,11 +264,11 @@ dependencies = [
[[package]]
name = "vlog_parser"
version = "0.10.0"
version = "0.10.2"
[[package]]
name = "vlog_refactor"
version = "0.10.0"
version = "0.10.2"
dependencies = [
"vlog_parser",
"vlog_semantic",
@@ -276,7 +276,7 @@ dependencies = [
[[package]]
name = "vlog_semantic"
version = "0.10.0"
version = "0.10.2"
dependencies = [
"vlog_parser",
]
+1 -1
View File
@@ -12,7 +12,7 @@ members = [
]
[workspace.package]
version = "0.10.0"
version = "0.10.2"
authors = ["Guoliang Chen"]
edition = "2021"
license = "MIT"
+40 -21
View File
@@ -610,30 +610,43 @@ go-to-definition, references and document/workspace symbols — the full list,
and what is deliberately *not* advertised yet, is in
`docs/features/lucisv-server/README.md`.
**The binary comes from the same build as the CLI.** Download it from the
[releases page](https://git.luci.ooo/lucio/lucisv/releases) for your
platform, or build it yourself:
**VS Code needs no separate binary**: every release on the
[releases page](https://git.luci.ooo/lucio/lucisv/releases) carries a
platform-specific `.vsix` with both binaries inside it — pick yours
(`darwin-arm64`, `darwin-x64`, `linux-x64`, `linux-arm64`, `win32-x64`)
and sideload it:
```bash
code --install-extension lucisv-<version>-darwin-arm64.vsix
```
— or take `lucisv-<version>-all.vsix`, which carries all five platforms' binaries
in one file and picks the right pair at startup, when the machine is not known
in advance (or is Alpine, which VS Code never offers a Linux package to).
Every other editor (and the universal `lucisv-<version>.vsix`, the fallback
for platforms not listed) finds `lucisv-server` on `PATH`; the binary comes
from the same build as the CLI:
```bash
cargo build --release # target/release/lucisv-server (and target/release/lucisv)
cp target/release/lucisv-server ~/.local/bin/ # anywhere on PATH
```
Every editor below defaults to finding `lucisv-server` on `PATH`; each also
accepts an absolute path if you would rather leave the binary in `target/`.
Each editor also accepts an absolute path if you would rather leave the
binary in `target/`.
**VS Code** — a thin extension in `editors/vscode/` whose entire job is
registering the file types and starting the server:
registering the file types and starting the server (bundled, from `PATH`, or
from the `lucisv.serverPath` setting). To build the packages yourself:
```bash
tools/release.sh # builds dist/lucisv-<version>.vsix
code --install-extension dist/lucisv-<version>.vsix
tools/release.sh # dist/lucisv-<version>.vsix + the host platform package
code --install-extension dist/lucisv-<version>-darwin-arm64.vsix
```
The `.vsix` is also attached to every release on the
[releases page](https://git.luci.ooo/lucio/lucisv/releases). Sideloading it
is the supported install; the extension is not on any marketplace. To package it by hand instead: `cd editors/vscode && npm ci &&
npx @vscode/vsce package`.
Sideloading is the supported install; the extension is not on any
marketplace.
Settings are listed in `editors/vscode/README.md`, along with the full steps,
the F5 development flow and troubleshooting.
@@ -694,20 +707,26 @@ expected outputs with `UPDATE_SNAPSHOTS=1 cargo test -p vlog_formatter`.
Prebuilt downloads live on the
[releases page](https://git.luci.ooo/lucio/lucisv/releases): every tagged
version carries `lucisv` and `lucisv-server` for Apple Silicon and Intel
macOS, static-musl and RHEL 8-compatible glibc Linux, and Windows, plus the
`.vsix` and a `SHA256SUMS` to verify them with
(`shasum -a 256 -c SHA256SUMS`). Copy the two binaries onto your `PATH` and
sideload the extension with `code --install-extension`. The macOS binaries
are smoke-tested on the build machine; the Linux and Windows ones are
cross-built and audited (file type, dynamic-linkage, glibc-version ceiling),
not executed — there is no Linux or Windows machine in the loop.
version carries **seven `.vsix` packages** — platform-specific ones for
Apple Silicon and Intel macOS, x86-64 and ARM64 Linux (static musl) and
Windows, each with `lucisv` and `lucisv-server` embedded, an
all-platforms one carrying every pair at once for unknown or mixed
machines, plus the universal no-binary fallback — and a `SHA256SUMS` to
verify them with
(`shasum -a 256 -c SHA256SUMS`). Sideload the one for your machine with
`code --install-extension`. Standalone binaries are not published; build
them with `cargo build --release` (or `tools/release.sh --cross` for the
full set — the release binaries are cut from the same scripts). The macOS
binaries inside the packages are smoke-tested on the build machine; the
Linux and Windows ones are cross-built and audited (file type,
dynamic-linkage, glibc-version ceiling), not executed — there is no Linux
or Windows machine in the loop.
To build the same artifact set yourself:
```bash
tools/release.sh # host binaries + the .vsix + SHA256SUMS, into dist/
tools/release.sh --cross # ...plus the four cross-built platforms
tools/release.sh --cross # ...plus the four cross-built platforms and the all package
```
The script itself publishes nothing anywhere; publishing is CI's job —
+7 -1
View File
@@ -1391,7 +1391,13 @@ mod tests {
let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../../corpus");
let target_dir = root.join("ibex/vendor/lowrisc_ip/ip/prim/rtl");
let old = target_dir.join("prim_assert.sv");
assert!(old.is_file(), "the corpus is checked in: {old:?}");
// Skipped when `corpus/` is not checked out, like every other
// corpus test in this crate — asserting its presence panicked any
// environment (a bare CI checkout, `act`) that never fetched it.
if !old.is_file() {
eprintln!("corpus/ not checked out — skipping");
return;
}
let new = target_dir.join("prim_assert_renamed.sv");
let mut ws = Workspace::default();
+100 -6
View File
@@ -5,11 +5,18 @@
Automate the checks and the release. Every push to master runs the three
checks CLAUDE.md requires (fmt, clippy, test) on Gitea Actions; every tag
`vX.Y.Z` builds the full cross-platform artifact set (Apple Silicon +
x86_64 macOS, static-musl and RHEL 8-compatible Linux, Windows — both
binaries each — plus the `.vsix` and `SHA256SUMS`) and publishes a Gitea
release whose notes are the CHANGELOG section for that version. The point
is that a release is one `git tag` + `git push` and cannot ship without
green checks, matching versions, and written notes.
x86_64 macOS, static-musl x86-64/ARM64 and RHEL 8-compatible Linux,
Windows — both binaries each — plus the seven `.vsix` packages and
`SHA256SUMS`) and publishes a Gitea release whose notes are the CHANGELOG
section for that version. **Published assets are the seven `.vsix` packages
only** (since 2026-08-27, owner decision): the extension is the product a
release delivers, every package is checked by name before publishing, and
the loose binaries — still built and audited, since the packages embed
them — stay unpublished; a standalone binary is
`cargo build --release` for whoever wants one
(docs/features/editor-platform-vsix). The point is that a release is one
`git tag` + `git push` and cannot ship without green checks, matching
versions, written notes, and all seven packages.
## Assumptions
@@ -38,8 +45,20 @@ green checks, matching versions, and written notes.
## Handshakes
- Consumes `tools/release.sh --cross` unchanged: artifact names
(`lucisv[-server]-<version>-<triple>[.exe]`, `lucisv-<version>.vsix`,
(`lucisv[-server]-<version>-<triple>[.exe]`,
`lucisv-<version>[-<vsce-target>].vsix`, `lucisv-<version>-all.vsix`,
`SHA256SUMS`) and the version-from-binary convention.
`tools/prune_release_assets.sh` depends on those `.vsix` names exactly —
it checks all **seven** by name and filters `SHA256SUMS` down to `.vsix`
lines before publishing. A package added, renamed or dropped in
`release.sh` must be reflected in that script's suffix list, or the
release fails naming the file it could not find
(docs/features/editor-platform-vsix).
- The workflow's steps are one-liners calling `tools/` scripts, so every
release step is runnable by hand on a developer machine and testable
without pushing a tag. `prune_release_assets.sh` in particular is safe to
re-run: a second run over an already-pruned directory finds the same seven
packages and verifies them again.
- Consumes `CHANGELOG.md`'s heading convention: `## <version> — <date>`;
`tools/release_notes.sh` keys on the second word of `## ` headings.
- `tools/publish_release.sh` expects the GitHub-compatible CI environment
@@ -68,6 +87,18 @@ green checks, matching versions, and written notes.
automates what RELEASING.md documented as manual; Linux/Windows binaries
remain audited, never executed (no such machine in the loop, and no
container runtime on the runner).
- [x] Publish `.vsix` packages only (2026-08-27): after the audit, the
workflow asserts all seven packages exist by name, filters `SHA256SUMS`
down to them (keeping the audited hashes), re-verifies it, and deletes
the loose binaries from `dist/` so `publish_release.sh` attaches only
the packages. Prune logic tested locally against a real `--cross`
`dist/`, with a negative control (one package removed → the step fails
naming it).
- [x] That logic lives in `tools/prune_release_assets.sh` (2026-08-27), not
inline in the workflow: every release step is a one-line call into
`tools/`, so it can be run and negative-controlled on a developer machine
without pushing a tag. The seventh (all-platforms) package joined the
must-exist list at the same time.
- [ ] A second runner on a non-macOS host, if native-built (rather than
cross-built) Linux artifacts are ever wanted.
@@ -92,6 +123,69 @@ green checks, matching versions, and written notes.
rejected: no container runtime exists on the runner Mac, and installing
a VM stack is an owner decision, not a CI increment.
- 2026-08-27 — lead. Owner decision: the release page ships the six
`.vsix` packages only (each platform package a must, checked by name;
the universal fallback included), no loose binaries — the platform
packages embed them, and an experienced user builds standalone binaries
with cargo. Implemented as a "Keep only the extension packages" step in
`release.yml` between the artifact audit and the notes extraction: the
audit still sees (and gates on) the loose binaries, then the step
filters `SHA256SUMS` to `.vsix` lines — the published hashes are the
audited ones, not recomputed — deletes everything else from `dist/`,
and re-runs `shasum -c`. `publish_release.sh` is untouched: it attaches
whatever `dist/` holds. Tested against the real 0.10.0 `--cross` dist
(six packages verify, correct survivors) and negative-controlled (one
package removed → fails naming `lucisv-0.10.0-linux-arm64.vsix`). Docs
trued up: RELEASING.md (publishing + CI sections), top-level README
(Editor setup and Install-and-releases sections now lead with the
platform package and say binaries are build-your-own), and this README's
Goal/Handshakes/Status.
- 2026-08-27 — dev (all-platforms package round). Two changes here, both
in service of the seventh `.vsix` (`docs/features/editor-platform-vsix`):
- **The inline "Keep only the extension packages" step became
`tools/prune_release_assets.sh <dist-dir> <version>`.** Same logic,
same order — check every package by name, filter `SHA256SUMS` to its
`.vsix` lines rather than recompute, delete everything else, re-verify
with `shasum -c` — now in a script with a usage header like its
siblings, so `release.yml` is back to one-line steps and the step is
testable without a tag. It grew the `-all` suffix and argument
validation (`[ $# -eq 2 ]`, missing dir, missing `SHA256SUMS` → exit 2,
matching `publish_release.sh`'s convention); a missing package is still
exit 1 naming the file.
- **`release.yml`**: the step body is now
`tools/prune_release_assets.sh dist "${GITHUB_REF_NAME#v}"`, and the
header comment says seven packages. Nothing else in the workflow moved;
the prune still sits between the artifact audit and the notes
extraction, so the audit keeps gating on the loose binaries before they
are deleted.
**Verified**, from the real repo path, against the real `dist/` from a
`tools/release.sh --cross` run of 0.10.1 (copies only — `dist/` itself was
left intact for the lead, since the script deletes files):
| Check | Result |
|---|---|
| `bash -n tools/prune_release_assets.sh` | clean |
| positive: a 20-file `dist/` copy | exit 0, 8 survivors (7 `.vsix` + `SHA256SUMS`), `SHA256SUMS` down to 7 lines, all 7 verify `OK` |
| negative: `lucisv-0.10.1-all.vsix` removed | exit 1, `missing lucisv-0.10.1-all.vsix`, **and nothing deleted** — all 19 remaining files still there, because the name check runs before any destructive step |
| negative: wrong version argument (`0.10.0`) | exit 1, `missing lucisv-0.10.0.vsix`, nothing deleted |
| negative: one argument / missing dir / dir without `SHA256SUMS` | exit 2 each, with the usage or the specific reason |
| re-run over an already-pruned directory | exit 0, same 7 packages verify again — a CI job re-run is safe |
| `python3 -c yaml.safe_load` on `release.yml` | parses; the six step names unchanged |
The negative controls were run on copies in the session scratchpad, but
the script itself and every `release.sh` run were driven from
`/Users/guoliangchen/repo/verilogrustformatter` — `vsce` collects zero
files under the scratchpad's UUID path
(`docs/features/editor-packaging` QA Finding 2).
Not verified: the workflow has not been run on the Gitea runner in this
round — no tag was pushed (and pushing one is the lead's call). The step
is a one-line invocation of a script proven by hand on the same machine
the runner is, which is as close as this gets without cutting a release.
## QA log
_(no QA round — infrastructure, verified by the live v0.7.1 run; see work log)_
@@ -0,0 +1,124 @@
# VS Code Marketplace page
## Goal
Turn the VS Code extension's Marketplace presentation into a user-facing
overview of lucisv: a recognizable icon and banner, clear install and usage
instructions, accurate discovery metadata, and a complete visual catalogue of
the editing, formatting, analysis, navigation, hierarchy, refactoring, and
workspace features that ship in the bundled language server.
## Assumptions
- The platform-specific extension packages ship `lucisv` and
`lucisv-server`, as release 0.10.1 does; users should not be given build or
`PATH` setup instructions on the Marketplace page.
- The Marketplace Details tab renders `editors/vscode/README.md`; the Features
tab is generated from `package.json` contribution points. Since `vsce` does
not recognize the Gitea repository host for relative-URL rewriting, README
artwork uses absolute HTTPS links to the repository's raw PNG files.
- Marketplace publishing rejects user-provided SVG images. Editable SVG
artwork therefore lives here as source, while the extension README and icon
use rendered PNG files under `editors/vscode/images/`.
- ~~`https://lucisv.dev` is the public documentation homepage declared by the
documentation site~~ — **corrected at lead review**: the domain does not
exist (NXDOMAIN, checked 2026-08-27), so `homepage` and the README's
documentation link point at the repository instead. Restore them the day the
domain is real. The checked-out Git remote is the canonical source
repository.
## Handshakes
- **Consumes** the shipped capability table in
`docs/features/lucisv-server/README.md`, the static grammar/snippet/settings
contributions in `editors/vscode/package.json`, and release 0.10.1 notes in
`CHANGELOG.md`.
- **Promises** every user-visible shipped capability is represented in the
Details page, including newer 0.8–0.10 features that the former README did
not foreground.
- **Promises** only allowed VS Code Marketplace categories and a PNG icon of
at least 256×256 pixels are declared in the extension manifest.
- **Promises** the extension package includes the rendered images but does not
include the SVG source artwork.
## Status / TODO
- [x] Inventory the extension's static contributions and server capabilities.
- [x] Inspect tag/release 0.10.1 and carry its bundled-binary install model into
the page.
- [x] Add icon, banner, discovery keywords, resources, and the Snippets
category to the manifest.
- [x] Replace build-oriented copy with install, quick-use, feature, settings,
and troubleshooting guidance.
- [x] Add two visual diagrams and a compact label row to the Details page.
- [x] Render all Marketplace-facing artwork as PNG and verify its dimensions.
- [x] Validate the manifest, Markdown image targets, and package contents.
## Work log
### 2026-08-27 — Marketplace presentation refresh
Read the latest local tag (`v0.10.1`), its changelog entry, the language-server
capability table, editor guide, extension manifest, grammar, snippets, and
settings. The release page itself was not reachable through the web index, so
the signed repository state at `v0.10.1` and its checked-in release notes are
the release source of truth.
Rewrote the extension README for end users and removed all build, packaging,
and extension-development instructions. Added the 0.10.1 platform matrix and
made the bundled tool/server behavior explicit. Added a full capability matrix
covering formatting, diagnostics, completion/templates, navigation,
presentation, hierarchy, refactoring, and workspace lifecycle.
Added a waveform/chip icon and two diagrams using one dark visual system. SVG
sources are retained in this feature directory for future edits; PNG renders
are the only versions referenced or packaged because VS Code Marketplace
publishing rejects user SVGs. Updated manifest metadata using the official
extension-manifest field and category list.
## QA log
### 2026-08-27 — local validation
- Parsed `package.json` with Node and checked the local icon path and all
absolute README image targets.
- Confirmed the icon is 512×512 and both diagrams render at 1200px wide.
- Ran `vsce ls` to verify the PNGs, README, manifest, snippets, grammar, and
extension entry point are included, while SVG sources are outside the
extension package.
- Compared the README feature matrix against the complete server capability
table and the manifest's language, grammar, snippet, color, and setting
contributions.
## Review
**2026-08-27 — lead. Verdict: accepted with corrections; commits with the
all-platforms-package round.**
The page itself is good work: the capability matrix was cross-checked by the
round's own QA against the server capability table, the artwork ships as PNG
with SVG sources kept out of the package, and the manifest additions are all
legitimate Marketplace fields. Three corrections at review, all applied
directly by the lead:
1. **`https://lucisv.dev` does not exist** (NXDOMAIN). The Assumptions entry
presented it as a fact nobody had checked. `homepage` and the README's
documentation link now point at the repository; the assumption is struck
through with the correction, not deleted.
2. **The install table was six packages, not seven** — the universal
no-binary fallback was dropped in the rewrite, which broke the Handshake
the concurrent editor-platform-vsix round had explicitly requested of this
one (its README, "Requested of `editor-marketplace-page`"). A row for it
is restored. Found by that round's QA.
3. **A troubleshooting entry for the duplicate-hover trap**: the pre-rename
`vfmt` extension left installed alongside lucisv attaches a second
language server and every hover/diagnostic shows twice — diagnosed live on
the owner's machine (2026-08-27) after a bug report; the server itself
answers once, verified over the wire in both single-file and workspace
modes.
Process note, recorded rather than hidden: this round ran concurrently with
editor-platform-vsix and rewrote `editors/vscode/README.md` while that round
was editing it, discarding its edits mid-flight; the platform round
re-applied them additively. Concurrent rounds over one file cost a re-apply
and an audit — coordinate ownership of shared files next time.
@@ -0,0 +1,43 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="430" viewBox="0 0 1200 430">
<defs>
<linearGradient id="bg" x1="0" y1="0" x2="1200" y2="430" gradientUnits="userSpaceOnUse"><stop stop-color="#07111F"/><stop offset="1" stop-color="#0C1C2C"/></linearGradient>
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0 0L10 5L0 10Z" fill="#5BC0FF"/></marker>
<filter id="shadow" x="-20%" y="-20%" width="140%" height="160%"><feDropShadow dx="0" dy="8" stdDeviation="10" flood-color="#000" flood-opacity=".35"/></filter>
</defs>
<rect width="1200" height="430" rx="30" fill="url(#bg)"/>
<text x="54" y="63" fill="#F4F8FC" font-family="-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif" font-size="29" font-weight="700">Built as one coherent language toolchain</text>
<text x="54" y="96" fill="#90A5B8" font-family="-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif" font-size="16">The extension is the front door; the bundled server connects every editor action to the same analysis engines.</text>
<g filter="url(#shadow)" font-family="-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif">
<g transform="translate(54 141)">
<rect width="230" height="205" rx="22" fill="#111F2F" stroke="#29465E"/>
<rect x="22" y="22" width="72" height="28" rx="14" fill="#193C54"/><text x="37" y="41" fill="#8CD8FF" font-size="12" font-weight="700">VS CODE</text>
<text x="22" y="86" fill="#F4F8FC" font-size="23" font-weight="700">lucisv extension</text>
<text x="22" y="120" fill="#A8BAC9" font-size="14">File types + grammar</text><text x="22" y="146" fill="#A8BAC9" font-size="14">Snippets + theme colors</text><text x="22" y="172" fill="#A8BAC9" font-size="14">LSP client</text>
</g>
<g transform="translate(360 141)">
<rect width="270" height="205" rx="22" fill="#10252D" stroke="#2C5A5B"/>
<rect x="22" y="22" width="96" height="28" rx="14" fill="#17413D"/><text x="38" y="41" fill="#7FF5DE" font-size="12" font-weight="700">BUNDLED</text>
<text x="22" y="86" fill="#F0FFFC" font-size="23" font-weight="700">lucisv-server</text>
<text x="22" y="120" fill="#A8C5C1" font-size="14">LSP 3.18 over stdio</text><text x="22" y="146" fill="#A8C5C1" font-size="14">Incremental document overlay</text><text x="22" y="172" fill="#A8C5C1" font-size="14">Request cancellation + progress</text>
</g>
<g transform="translate(706 141)">
<rect width="440" height="205" rx="22" fill="#171D30" stroke="#3D4669"/>
<text x="22" y="46" fill="#F5F2FF" font-size="20" font-weight="700">Shared Rust engines</text>
<g font-size="13" font-weight="700">
<rect x="22" y="68" width="114" height="34" rx="10" fill="#243451"/><text x="42" y="90" fill="#8CD8FF">PARSER</text>
<rect x="148" y="68" width="124" height="34" rx="10" fill="#1B413D"/><text x="167" y="90" fill="#7FF5DE">FORMATTER</text>
<rect x="284" y="68" width="116" height="34" rx="10" fill="#46321E"/><text x="307" y="90" fill="#FFD194">LINTER</text>
<rect x="22" y="114" width="160" height="34" rx="10" fill="#2B2546"/><text x="43" y="136" fill="#C8B7FF">SEMANTIC MODEL</text>
<rect x="194" y="114" width="206" height="34" rx="10" fill="#422331"/><text x="218" y="136" fill="#FFACC0">REFACTOR ENGINE</text>
</g>
<text x="22" y="180" fill="#AAB5CC" font-size="14">Workspace index • include graph • open-buffer overlay</text>
</g>
</g>
<path d="M294 244H346" stroke="#5BC0FF" stroke-width="4" marker-end="url(#arrow)"/>
<path d="M640 244H692" stroke="#5BC0FF" stroke-width="4" marker-end="url(#arrow)"/>
<g font-family="-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif">
<rect x="54" y="374" width="322" height="34" rx="17" fill="#173B36"/><text x="74" y="396" fill="#85F1DC" font-size="13" font-weight="700">v0.10.1 · TOOL + SERVER INCLUDED</text>
<text x="1146" y="396" fill="#6F8498" font-size="13" text-anchor="end">macOS · Linux · Windows</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

@@ -0,0 +1,78 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="560" viewBox="0 0 1200 560">
<defs>
<linearGradient id="bg" x1="0" y1="0" x2="1200" y2="560" gradientUnits="userSpaceOnUse">
<stop stop-color="#0E223A"/><stop offset="1" stop-color="#050A12"/>
</linearGradient>
<filter id="shadow" x="-20%" y="-20%" width="140%" height="160%"><feDropShadow dx="0" dy="10" stdDeviation="12" flood-color="#000" flood-opacity=".32"/></filter>
</defs>
<rect width="1200" height="560" rx="32" fill="url(#bg)"/>
<circle cx="1100" cy="-10" r="240" fill="#2A5E80" opacity=".13"/>
<circle cx="80" cy="560" r="220" fill="#315D59" opacity=".12"/>
<text x="56" y="69" fill="#F4F8FC" font-family="-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif" font-size="30" font-weight="700">One extension. The whole RTL editing loop.</text>
<text x="56" y="103" fill="#91A6BA" font-family="-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif" font-size="17">Fast feedback from the same Rust parser, formatter, linter, semantic model, and workspace index.</text>
<g filter="url(#shadow)" font-family="-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif">
<g transform="translate(50 146)">
<rect width="202" height="334" rx="20" fill="#101D2C" stroke="#264158"/>
<rect x="18" y="18" width="48" height="8" rx="4" fill="#38E8C5"/>
<text x="18" y="64" fill="#EAFBF7" font-size="22" font-weight="700">Format</text>
<text x="18" y="98" fill="#A9BAC8" font-size="15">Whole file</text><text x="18" y="124" fill="#A9BAC8" font-size="15">Range + multi-range</text>
<text x="18" y="150" fill="#A9BAC8" font-size="15">On type + on save</text><text x="18" y="176" fill="#A9BAC8" font-size="15">Alignment inference</text>
<rect x="18" y="208" width="166" height="72" rx="12" fill="#0A302E"/>
<text x="32" y="237" fill="#7FF5DE" font-size="13" font-weight="700">VERIFIED OUTPUT</text>
<text x="32" y="262" fill="#BBD7D1" font-size="13">safe • idempotent</text>
<path d="M18 303H72V286H108V318H148V296H184" fill="none" stroke="#38E8C5" stroke-width="5" stroke-linejoin="round"/>
</g>
<g transform="translate(274 146)">
<rect width="202" height="334" rx="20" fill="#101D2C" stroke="#264158"/>
<rect x="18" y="18" width="48" height="8" rx="4" fill="#FFB45B"/>
<text x="18" y="64" fill="#FFF4E8" font-size="22" font-weight="700">Diagnose</text>
<text x="18" y="98" fill="#A9BAC8" font-size="15">Parse diagnostics</text><text x="18" y="124" fill="#A9BAC8" font-size="15">Live lint rules</text>
<text x="18" y="150" fill="#A9BAC8" font-size="15">Safe quick fixes</text><text x="18" y="176" fill="#A9BAC8" font-size="15">Fix all</text>
<rect x="18" y="208" width="166" height="72" rx="12" fill="#392614"/>
<text x="32" y="237" fill="#FFD194" font-size="13" font-weight="700">EDITING-AWARE</text>
<text x="32" y="262" fill="#E1C7A8" font-size="13">tolerant parsing</text>
<circle cx="42" cy="306" r="12" fill="#FFB45B"/><path d="M39 300V309L46 314" fill="none" stroke="#392614" stroke-width="3" stroke-linecap="round"/>
<text x="64" y="312" fill="#BFCBD5" font-size="13">instant feedback</text>
</g>
<g transform="translate(498 146)">
<rect width="202" height="334" rx="20" fill="#101D2C" stroke="#264158"/>
<rect x="18" y="18" width="48" height="8" rx="4" fill="#5BC0FF"/>
<text x="18" y="64" fill="#EDF8FF" font-size="22" font-weight="700">Understand</text>
<text x="18" y="98" fill="#A9BAC8" font-size="15">Semantic colors</text><text x="18" y="124" fill="#A9BAC8" font-size="15">Hover + macros</text>
<text x="18" y="150" fill="#A9BAC8" font-size="15">Inlay hints</text><text x="18" y="176" fill="#A9BAC8" font-size="15">Rainbow scopes</text>
<rect x="18" y="208" width="166" height="72" rx="12" fill="#102C40"/>
<text x="32" y="237" fill="#84D3FF" font-size="13" font-weight="700">DESIGN INTELLIGENCE</text>
<text x="32" y="262" fill="#B9D3E2" font-size="13">symbols, types, ports</text>
<g fill="none" stroke="#5BC0FF" stroke-width="3"><circle cx="49" cy="307" r="13"/><circle cx="101" cy="307" r="13"/><circle cx="153" cy="307" r="13"/><path d="M62 307H88M114 307H140"/></g>
</g>
<g transform="translate(722 146)">
<rect width="202" height="334" rx="20" fill="#101D2C" stroke="#264158"/>
<rect x="18" y="18" width="48" height="8" rx="4" fill="#A98BFF"/>
<text x="18" y="64" fill="#F4F0FF" font-size="22" font-weight="700">Navigate</text>
<text x="18" y="98" fill="#A9BAC8" font-size="15">Definition + type</text><text x="18" y="124" fill="#A9BAC8" font-size="15">References + symbols</text>
<text x="18" y="150" fill="#A9BAC8" font-size="15">Call hierarchy</text><text x="18" y="176" fill="#A9BAC8" font-size="15">Type hierarchy</text>
<rect x="18" y="208" width="166" height="72" rx="12" fill="#241D3C"/>
<text x="32" y="237" fill="#C8B7FF" font-size="13" font-weight="700">WORKSPACE-WIDE</text>
<text x="32" y="262" fill="#C9C0E1" font-size="13">filelist-aware index</text>
<path d="M28 316L64 290L101 316L139 290L176 316" fill="none" stroke="#A98BFF" stroke-width="4" stroke-linecap="round"/>
</g>
<g transform="translate(946 146)">
<rect width="202" height="334" rx="20" fill="#101D2C" stroke="#264158"/>
<rect x="18" y="18" width="48" height="8" rx="4" fill="#FF6F91"/>
<text x="18" y="64" fill="#FFF0F4" font-size="22" font-weight="700">Refactor</text>
<text x="18" y="98" fill="#A9BAC8" font-size="15">Cross-file rename</text><text x="18" y="124" fill="#A9BAC8" font-size="15">Add/remove ports</text>
<text x="18" y="150" fill="#A9BAC8" font-size="15">Propagate ports</text><text x="18" y="176" fill="#A9BAC8" font-size="15">Repair includes</text>
<rect x="18" y="208" width="166" height="72" rx="12" fill="#391C28"/>
<text x="32" y="237" fill="#FFACC0" font-size="13" font-weight="700">MULTI-FILE EDITS</text>
<text x="32" y="262" fill="#E1BCC6" font-size="13">one undoable change</text>
<path d="M30 304H82L72 294M82 304L72 314M172 304H120L130 294M120 304L130 314" fill="none" stroke="#FF6F91" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
</g>
</g>
<g font-family="-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif" font-size="13" font-weight="700">
<rect x="50" y="508" width="132" height="28" rx="14" fill="#143B36"/><text x="68" y="527" fill="#7FF5DE">VERILOG 2001</text>
<rect x="192" y="508" width="158" height="28" rx="14" fill="#182F44"/><text x="210" y="527" fill="#84D3FF">SYSTEMVERILOG</text>
<rect x="360" y="508" width="94" height="28" rx="14" fill="#302744"/><text x="380" y="527" fill="#C8B7FF">LSP 3.18</text>
<rect x="464" y="508" width="148" height="28" rx="14" fill="#3A2918"/><text x="483" y="527" fill="#FFD194">RUST-POWERED</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.8 KiB

@@ -0,0 +1,28 @@
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
<defs>
<linearGradient id="bg" x1="40" y1="28" x2="470" y2="490" gradientUnits="userSpaceOnUse">
<stop stop-color="#102846"/>
<stop offset="1" stop-color="#050A12"/>
</linearGradient>
<linearGradient id="signal" x1="68" y1="330" x2="445" y2="158" gradientUnits="userSpaceOnUse">
<stop stop-color="#38E8C5"/>
<stop offset="0.56" stop-color="#5BC0FF"/>
<stop offset="1" stop-color="#A98BFF"/>
</linearGradient>
<filter id="glow" x="-30%" y="-30%" width="160%" height="160%">
<feGaussianBlur stdDeviation="8" result="blur"/>
<feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
</filter>
</defs>
<rect x="20" y="20" width="472" height="472" rx="112" fill="url(#bg)"/>
<rect x="29" y="29" width="454" height="454" rx="104" fill="none" stroke="#2D4968" stroke-width="2"/>
<g fill="#17334D">
<circle cx="96" cy="104" r="5"/><circle cx="416" cy="104" r="5"/>
<circle cx="96" cy="408" r="5"/><circle cx="416" cy="408" r="5"/>
</g>
<path d="M72 320H142V198H215V340H289V152H363V274H440" fill="none" stroke="#13324D" stroke-width="34" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M72 320H142V198H215V340H289V152H363V274H440" fill="none" stroke="url(#signal)" stroke-width="18" stroke-linecap="round" stroke-linejoin="round" filter="url(#glow)"/>
<g fill="#FFB45B" stroke="#FFE0B5" stroke-width="4">
<circle cx="142" cy="198" r="12"/><circle cx="215" cy="340" r="12"/><circle cx="289" cy="152" r="12"/><circle cx="363" cy="274" r="12"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@@ -0,0 +1,785 @@
# editor-platform-vsix
## Goal
Installing the VS Code extension has always been half an install: the `.vsix`
is platform-independent JavaScript and the *server it spawns* is a binary the
user has to build or download and put on `PATH` first. This round closes that
gap the way rust-analyzer and ruff close it — **platform-specific `.vsix`
packages that carry the binaries inside them**. Five packages, one per
platform we cross-build for; VS Code picks the one matching the machine by the
`--target` stamped into the package, downloads only that one, and the
extension spawns the server out of its own install directory. The old
platform-independent package stays, unchanged in behaviour, as the universal
fallback for a platform we do not build (and for anyone who prefers their own
binary on `PATH`).
## Assumptions
- **`vsce`'s target names and rustc's triples are two different vocabularies**,
and the mapping between them is a hand-written table. `vsce` validates
`--target` against its own fixed list; nothing derives one name from the
other.
| vsce target | rust triple | why that triple |
|---|---|---|
| `darwin-arm64` | `aarch64-apple-darwin` | the host build |
| `darwin-x64` | `x86_64-apple-darwin` | Intel Macs (also runs under Rosetta) |
| `linux-x64` | `x86_64-unknown-linux-musl` | static, so it runs on every distro |
| `linux-arm64` | `aarch64-unknown-linux-musl` | same, for ARM servers/Pi/Asahi |
| `win32-x64` | `x86_64-pc-windows-gnu` | `.exe`, DLLs Windows 10+ ships |
- **Linux gets the musl build, not the glibc one.** `x86_64-unknown-linux-gnu`
is still built and shipped as a loose artifact (it exists for shops that
require a native glibc link — see `tools/RELEASING.md`), but the *extension*
embeds musl: a statically linked binary runs on any distro at any glibc
vintage, which is exactly the property an extension installed by a stranger
needs. There is no second `linux-x64` package to choose between.
- **Alpine is an accepted gap in the *targeted* packages.** `vsce` has separate
`alpine-x64` / `alpine-arm64` targets and VS Code running on Alpine looks for
*those*, not for `linux-x64` — so an Alpine user gets no platform package.
Building two more `--target`ed packages with identical contents to satisfy a
name is not worth the release-matrix growth today; if someone asks, it is a
two-line change (`alpine-x64` ← the same musl triple). Since 2026-08-27 the
all-platforms package covers that user anyway (see below): it is target-less,
so Alpine is offered it, and Node's `process.platform` there is plain
`'linux'`, which is the directory our static-musl binaries sit in.
- **VSIX extraction does not preserve the executable bit.** This is why
`extension.js` chmods what it is about to spawn rather than trusting the
package's file modes — the same thing rust-analyzer's extension does, for the
same reason. `release.sh` still `chmod +x`es the staged binaries before
packaging, so the mode inside the zip is right; the client-side chmod is the
belt to that suspenders.
- **No version handshake.** The bundled server is the one built from the same
tree as the extension, so extension and server always match by construction.
A user who points `lucisv.serverPath` at something else takes that risk, as
before.
- **The binaries are the same ones `dist/` ships.** `release.sh` stages them
*out of* `dist/`, so the file a user gets from the release page and the file
inside the `.vsix` are byte-identical (and the `.vsix` copies are covered
transitively by `SHA256SUMS`' entry for the package).
## Handshakes
**Consumed from `editor-packaging`** — the spawn contract, unchanged: binary
name `lucisv-server`, no arguments, LSP on stdin/stdout. The only thing this
feature changes is *which path* is spawned, never how.
**Consumed from `tools/release.sh`** — the `dist/lucisv[-server]-<version>-<triple>`
naming. The staging step reads those exact names; renaming an artifact breaks
packaging loudly (a missing `cp` source), not silently.
**Promised to `extension.js`** — the `bin/` layout contract, three shapes and
no fourth:
| package | `bin/` holds |
|---|---|
| universal `lucisv-<v>.vsix` | **nothing** — no `bin/` directory at all |
| a platform `lucisv-<v>-<target>.vsix` | exactly `lucisv` and `lucisv-server` (`.exe` on Windows), flat |
| the all-platforms `lucisv-<v>-all.vsix` | exactly ten files, `<platform>-<arch>/lucisv{,-server}` for the five platforms |
Names are always plain — no version, no triple. `release.sh` asserts all three
shapes with `unzip -Z1` after every package it builds, so "the extension found a
stale binary from the previous target" cannot ship. The all-platforms
directory names are literally the `${process.platform}-${process.arch}` strings
`extension.js` builds at runtime; that they also happen to equal vsce's target
names is a convenience, not a dependency (nothing passes `--target` for that
package).
**Promised to `tools/audit_artifacts.sh`** — every loose binary in `dist/` is
still named `lucisv[-server]-<version>-<triple>`; the `.vsix` names all end in
`.vsix` — `lucisv-<v>-all.vsix` included — and are skipped by the audit's
existing case arm before its "unrecognized artifact name" arm can see them.
**Promised to `tools/prune_release_assets.sh`** — a `--cross` run produces
exactly seven `.vsix` names, and those are the names the prune script checks
one by one: `lucisv-<v>.vsix`, the five `lucisv-<v>-<vsce-target>.vsix`, and
`lucisv-<v>-all.vsix`. Adding or renaming a package means editing that script's
suffix list too, or the release fails naming the file it could not find.
**Requested of `editor-marketplace-page`** — that round rewrote
`editors/vscode/README.md` end-to-end for a marketplace audience while this one
was running, and any further rewrite of it must keep two things: its install
table naming **seven** packages, not six (the five platform ones, `all`, and the
universal fallback), and a bundled-binaries sentence covering both layouts —
`bin/lucisv-server` in a platform package,
`bin/<platform>-<arch>/lucisv-server` in the all-platforms one. Both were
re-applied additively onto their rewrite; see the work log.
**Requested of other modules** — none.
## Resolution order in the extension
`extension.js` picks the server command from three candidates, most specific
first:
1. **A `lucisv.serverPath` the user actually set.** Detected with
`inspect('serverPath')`, not `get()`: `get()` cannot tell a user's setting
from the manifest's own `"default": "lucisv-server"`, and that default would
otherwise shadow the bundled binary for *everyone*. Any of
`globalValue`, `workspaceValue`, `workspaceFolderValue` or their three
language-scoped variants counts as "the user set it"; `defaultValue` and
`defaultLanguageValue` do not, because those are contributed defaults, not
user intent. Most specific wins, matching VS Code's own `get()` precedence.
2. **The bundled binary**, whichever of two layouts this package uses —
`<extension>/bin/lucisv-server`(`.exe`) first, then
`<extension>/bin/<platform>-<arch>/lucisv-server`(`.exe`). A file existing is
the whole runtime test for "which kind of package am I" — no build-time flag,
no manifest field. Both misses mean no bundled binary.
3. **The bare name `lucisv-server`**, looked up on `PATH`. What the universal
package has always done, and what a `cargo build` + `PATH` install still
does.
The CLI (`bin/lucisv`) is chmod'ed alongside the server even though nothing in
the extension spawns it: it is shipped so a user who installed the extension
already has the command-line tool, and a non-executable file would make that
claim false.
## The all-platforms package
`lucisv-<version>-all.vsix` is one package carrying **all five platforms'
binary pairs**, sorted into directories and chosen between at runtime:
```
bin/
darwin-arm64/lucisv, lucisv-server
darwin-x64/lucisv, lucisv-server
linux-x64/lucisv, lucisv-server (static musl)
linux-arm64/lucisv, lucisv-server (static musl)
win32-x64/lucisv.exe, lucisv-server.exe
```
**The directory names are `${process.platform}-${process.arch}`**, not vsce
target names — `extension.js` concatenates those two Node values and looks the
result up. That the five strings happen to be spelled the same way vsce spells
its targets is a coincidence worth having (one vocabulary in the release script
instead of two) and nothing more: this package is built **without** `--target`,
so vsce's names never enter the picture. Picking Node's own vocabulary is what
makes the lookup a two-line function with no table in it, and what makes a
platform we do not ship fail the obvious way — nothing on disk, fall through to
`PATH`, exactly like the universal package.
Why it exists, given five perfectly good targeted packages:
- **Alpine, and anything else vsce names separately.** VS Code on Alpine asks
the marketplace for `alpine-x64`, not `linux-x64`, so it is never offered our
Linux package — but its `process.platform` is plain `'linux'` (Node does not
distinguish libc), so it walks straight into `bin/linux-x64/`, and the binary
there is statically linked musl, which is precisely what Alpine wants. The
gap the targeted matrix leaves open is closed by not participating in the
targeting at all.
- **One file to mirror.** An internal file share, a locked-down machine, an
offline lab: one `.vsix` that works on whatever the person on the other end
turns out to be running beats a table of five and a question.
- **Unknown or mixed fleets**, where whoever hands out the package does not know
the architecture in advance.
The trade-off is size, and it is not small: every user downloads every
platform's binaries — 13.0 MB against 3.0 MB for a platform package (and 0.75 MB
for the universal one; measured on 0.10.1). That is why it is a seventh option
rather than the only one; when the platform is known, the platform package is
still the right answer.
**Built only with `--cross`**, because it needs all five pairs to exist. An
ordinary `tools/release.sh` produces six of the seven names and no `-all` one.
## What gets built, and when
| | `release.sh` | `release.sh --cross` |
|---|---|---|
| universal `lucisv-<v>.vsix` | yes | yes |
| `darwin-arm64` (host) | yes | yes |
| the other four | no | yes |
| `lucisv-<v>-all.vsix` | no | yes |
Without `--cross` there are no cross binaries to embed, so only the host
package can be built — building it anyway (rather than only the universal one)
keeps the packaging path exercised on every ordinary release run, including the
embedded-server smoke test. The CI release workflow runs `--cross`, so releases
always carry all seven.
## Status / TODO
- [x] `rustup target add --toolchain stable aarch64-unknown-linux-musl` on the
build Mac, and the line recorded in `tools/RELEASING.md`'s one-time setup.
- [x] `tools/release.sh`: `aarch64-unknown-linux-musl` in the `--cross` set,
same rust-lld linker and `DYLD_FALLBACK_LIBRARY_PATH` as the x86-64 musl
build; its two binaries land in `dist/` and in `SHA256SUMS`.
- [x] `editors/vscode/extension.js`: three-step server resolution, `inspect()`
for user intent, chmod of both bundled binaries.
- [x] `editors/vscode/package.json`: `lucisv.serverPath` description mentions
the bundled default.
- [x] `tools/release.sh`: stage `bin/`, package per target, remove `bin/`,
with an `EXIT` trap so a failure cannot leave binaries in the tree.
- [x] `tools/release.sh`: `unzip -Z1` content assertions for every package, and
an LSP smoke test of the server unzipped out of the host package.
- [x] `tools/audit_artifacts.sh`: `aarch64-unknown-linux-musl` arm.
- [x] `editors/vscode/.gitignore`: `bin/`.
- [x] Docs: this file, `tools/RELEASING.md`, `editors/vscode/README.md`.
- [x] **The all-platforms package** (2026-08-27): `extension.js`'s layered
`bin/` lookup, `release.sh`'s `package_all_vsix` under `--cross`, the
ten-entry content assertion, and a second embedded-server smoke test
driven out of `bin/<host-target>/` inside that package.
- [x] `tools/prune_release_assets.sh`: the seven-package check moved out of
`release.yml`'s inline step into a tools/ script, checked by name.
- [x] Docs for the all package: this file, `tools/RELEASING.md`, the top-level
`README.md`, `docs/features/ci-release/README.md`, and
`editors/vscode/README.md` (re-applied onto the concurrent
`editor-marketplace-page` rewrite — see the work log).
- [ ] **Not done, and not doable here:** none of the seven packages has been
*installed into a real VS Code*. `require('vscode')` resolves only in the
extension host, so the resolution order above is proven by reading it,
by a stubbed-`context` harness over a fake directory tree, and by the
packaging assertions — not by an editor picking the right package off a
marketplace. The Linux and Windows packages have additionally never
been *executed* anywhere — same standing limitation the loose binaries
have had since `--cross` existed. The Alpine claim in particular is
reasoned from Node's documented `process.platform` values, not observed
on an Alpine machine.
- [ ] **Not done, deliberate:** `alpine-x64` / `alpine-arm64` packages (see
Assumptions), and a `linux-x64` glibc variant.
## Work log
### 2026-08-27 — dev agent
- **Toolchain.** `rustup target add --toolchain stable
aarch64-unknown-linux-musl` ran clean (`rust-std` component only, no linker
needed — `rust-lld` links it, exactly like the x86-64 musl target).
`rustup target list --installed` now shows six targets. The line is in
`tools/RELEASING.md`'s one-time-setup block.
- **`release.sh` structure.** The new `aarch64-unknown-linux-musl` build sits
next to the x86-64 musl one with the identical env pair
(`DYLD_FALLBACK_LIBRARY_PATH="$tc/lib"` +
`CARGO_TARGET_..._LINKER=rust-lld`); the copy loop just gained the triple.
Packaging became three pieces: `vsce_target_for` (the triple→vsce-target
table), `package_vsix` (stage `bin/`, package, remove `bin/`), and
`expect_vsix_bins` (assert what a package carries). `bin_dir` is removed by an
`EXIT` trap set before the first build, so an interrupted or failed run cannot
leave a stale binary where the next package — or a developer's `git status` —
would pick it up.
- **The universal package is packaged first and with `bin/` provably absent**
(`rm -rf` immediately before, `expect_vsix_bins` with no expected entries
immediately after). That ordering matters: the universal package is the one
that must never accidentally carry a platform's binaries.
- **The embedded smoke test is a real round trip.** The host package is
unzipped into `target/vsix-check/` (gitignored, outside the session
scratchpad), both binaries are asserted present, the server is chmod'ed and
driven through the same `smoke.js` LSP session the loose binary gets, and the
directory is removed. So the claim "installing the extension gives you a
working server" is tested against a file that has actually been through the
zip.
- **`inspect()` and not `get()`** is the one non-obvious line in
`extension.js`, and the reason is in the file: `get()` returns
`"lucisv-server"` for a user who has never touched the setting, because that
is the manifest default — so a `get()`-based check would make the bundled
binary unreachable for every user who did not explicitly override it. The
scope list is most-specific-first and excludes `defaultValue` /
`defaultLanguageValue`.
- **The objdump question was answered by running it, not guessed.** This
machine's `x86_64-unknown-linux-gnu-objdump` *does* parse an aarch64 ELF —
`-p` prints `file format elf64-little` and the full program header table, and
finds zero `NEEDED` entries in our static binary — so the new arm keeps the
same `NEEDED` check the x86-64 musl arm uses. It also asserts `file -b`'s own
`ARM aarch64` and `statically linked`, for two reasons the comment states:
objdump's `elf64-little` does not name the architecture at all (so `file` is
the only thing checking we did not ship an x86-64 binary under an aarch64
name), and a future binutils that stopped parsing aarch64 would make the
`NEEDED` grep pass *by finding nothing* — the exact quiet failure the audit
exists to prevent.
- **`x86_64-unknown-linux-gnu` gets no `.vsix`.** It is still built and still
audited; `linux-x64` is the musl build because a static binary is the right
thing to hand a stranger. Recorded in Assumptions so nobody re-litigates it
silently.
- **The no-`--cross` path was run too**, into a throwaway `-o` directory, to
confirm the decision in "What gets built": host pair, universal package,
`darwin-arm64` package, embedded smoke test, checksums, exit 0.
- **`.vscodeignore` was left alone** and confirmed not to exclude `bin/` (it
lists `smoke.js`, `.vscode/**`, `.gitignore` and nothing else). `bin/` is in
`editors/vscode/.gitignore` instead, as a second line of defence behind the
`EXIT` trap.
- Did not bump any version, did not `git commit`/`git push`, did not touch
`crates/`. `TODO.md` was read; the two items that touch editor packaging
(§6 "Editor packaging", §6 "Release prep") are already `[x]` and neither
mentions platform-specific packages, so nothing was checked off.
**Validation run on this machine (from the real repo path, never the
scratchpad — `vsce` collects zero files under the scratchpad's UUID segment,
`docs/features/editor-packaging` QA Finding 2):**
| Check | Result |
|---|---|
| `bash -n tools/release.sh tools/audit_artifacts.sh` | clean |
| `node --check editors/vscode/extension.js` | clean |
| `python3 -c json.load` on `editors/vscode/package.json` | valid |
| `cargo fmt --check` | clean |
| `cargo clippy --all-targets` | clean, no new warnings |
| `cargo test -p lucisv_server` | **1015 unit + 50 e2e + 3 grammar green**, 5 ignored, 0 failed |
| `tools/release.sh --cross` | exit 0 — 18 artifacts + `SHA256SUMS` (table below) |
| `tools/release.sh -o target/relcheck-dist` (no `--cross`) | exit 0 — host pair, universal `.vsix`, `darwin-arm64` `.vsix`, `SHA256SUMS` |
| `tools/audit_artifacts.sh dist` | **12 binaries audited, exit 0** |
| embedded-server smoke (host `.vsix`, unzipped to `target/vsix-check/`) | `smoke: OK`, 10 messages |
| `shasum -a 256 -c SHA256SUMS` in `dist/` | 18/18 OK |
**Artifacts from `tools/release.sh --cross` (lucisv 0.10.0):**
| `.vsix` | size | `extension/bin/` |
|---|---|---|
| `lucisv-0.10.0.vsix` (universal) | 487,837 | *(nothing — `unzip -Z1` reports "filename not matched")* |
| `lucisv-0.10.0-darwin-arm64.vsix` | 2,721,294 | `lucisv-server`, `lucisv` |
| `lucisv-0.10.0-darwin-x64.vsix` | 2,991,683 | `lucisv-server`, `lucisv` |
| `lucisv-0.10.0-linux-x64.vsix` | 3,121,350 | `lucisv-server`, `lucisv` |
| `lucisv-0.10.0-linux-arm64.vsix` | 2,970,545 | `lucisv-server`, `lucisv` |
| `lucisv-0.10.0-win32-x64.vsix` | 2,906,955 | `lucisv-server.exe`, `lucisv.exe` |
Plus the twelve loose binaries, now including
`lucisv-0.10.0-aarch64-unknown-linux-musl` (1,930,768) and
`lucisv-server-0.10.0-aarch64-unknown-linux-musl` (4,022,088). `file -b` on the
latter: `ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically
linked, not stripped`.
Three things were checked beyond "it built":
- **The `--target` really is stamped in.** `extension.vsixmanifest` carries
`TargetPlatform="darwin-arm64"` / `"linux-arm64"` / `"win32-x64"` in the
respective packages, and the universal one contains no `TargetPlatform`
attribute at all — that attribute is how VS Code picks a package.
- **The executable bit survives packaging.** `unzip -Z` reports `-rwxr-xr-x`
for both entries inside the packages. The client-side chmod stays anyway,
because it is *VS Code's extraction*, not the zip, that drops the bit.
- **The `EXIT` trap was negative-controlled**, not assumed: with an `npx` stub
on `PATH` that fails whenever it sees `--target`, `release.sh` staged
`editors/vscode/bin/`, failed the platform package, and exited — and
`editors/vscode/bin/` was gone afterwards, with `git status --short
editors/vscode` showing only the intended edits. A packaging failure cannot
leave a binary in the tree.
**Not run, and why:** no package was installed into VS Code (the extension host
is the only place `require('vscode')` resolves — unchanged limitation since
2026-08-19), so the resolution order in `extension.js` is proven by reading and
by the packaging assertions, not by an editor. The Linux and Windows binaries
were not executed anywhere (no such machine in the release loop; `file`- and
`objdump`-audited instead), which means the four non-host packages have never
had their embedded server spawned. The marketplace's own `--target` selection
was likewise not exercised: nothing here is published, so the check that
`TargetPlatform` is present is as far as it goes.
### 2026-08-27 — lead (post-QA): chmod both bundled binaries unconditionally
QA's Finding 1: with a user-set `lucisv.serverPath`, the `||` chain in
`activate` short-circuited past `bundledBinary(context, 'lucisv-server')`, so
only the CLI got chmod'ed and `editors/vscode/README.md`'s "makes both
executable" was one clause too strong. Fixed at the code, not the wording:
the bundled server is now resolved into a `bundledServer` local before the
`||` chain, so both binaries are made executable on every activation and the
README sentence is exactly true. Two lines plus a comment; `node --check`
clean. Lead-authored directly — the dev/QA loop would add latency, not safety
(precedent: the 0.4.2 entry in docs/features/editor-packaging).
### 2026-08-27 — lead (follow-up): the release publishes the packages only
Owner decision, implemented in the ci-release feature (see
docs/features/ci-release/README.md, 2026-08-27 work log entry): the release
page now carries the six `.vsix` packages and `SHA256SUMS` only. The loose
per-triple binaries are still built and audited — the packages are made from
them — but no longer attached; standalone binaries are build-your-own.
Nothing in this feature's scripts changed: `release.sh` still produces the
full `dist/`, and the pruning lives in `release.yml` after the audit.
### 2026-08-27 — dev agent (round 2): the all-platforms package
Owner request: a seventh package carrying every platform's binaries, chosen at
runtime — plus a consolidation of the CI release flow. Four code files.
- **`extension.js`: `bundledBinary` became a two-candidate lookup**, flat first,
`bin/<platform>-<arch>/` second, `undefined` if both miss. It is a `.find()`
over two `asAbsolutePath` results and nothing else: no package-kind flag, no
manifest field, no table of platform names. Everything downstream — the
`.exe` suffix, the chmod-in-`try`/`catch`, the
`userServerPath() || bundledServer || 'lucisv-server'` order, the two calls in
`activate` — is untouched, so the fat layout is covered for the CLI and the
server at once. The doc comment now describes both layouts and states the
fall-through for a platform we ship nothing for (`win32-arm64`): nothing on
disk in either layout, so `PATH`, exactly like the universal package.
- **Node's vocabulary, not vsce's.** The directory names are
`${process.platform}-${process.arch}` because that is the string the extension
can build with no lookup table. That the five values happen to be spelled the
way vsce spells its targets is why `release.sh` can reuse `vsce_target_for`
for the staging directory names — a convenience recorded in Assumptions, not
a dependency: the package is built with **no** `--target`, so vsce's naming
never enters it. Verified in the artifact: `extension.vsixmanifest` in
`lucisv-0.10.1-all.vsix` carries no `TargetPlatform` attribute at all, same as
the universal package.
- **`release.sh`: `package_all_vsix`**, called only under `--cross`, and given
`$vsix_triples` — the same list the per-platform loop just used — rather than
a second copy of the five triples. It stages each pair into
`bin/<vsce-target>/`, `chmod +x`es them, packages with no `--target`, removes
the staging dir, and asserts the contents. It builds its expected-entry list
in the same loop that stages, so the assertion cannot drift from what was
staged.
- **`expect_vsix_bins` needed no change, which I checked rather than assumed.**
Info-ZIP's `*` matches `/` (unlike a shell glob), so `extension/bin/*` lists
nested paths — confirmed on a hand-built zip with both a flat and a nested
entry before touching `release.sh`. The one wrinkle that could have bitten:
the same test showed Info-ZIP *also* returns directory entries
(`extension/bin/`, `extension/bin/darwin-arm64/`), which would have broken an
exact-set comparison — but vsce writes **no** directory entries at all
(`unzip -Z1 … | grep -c '/$'` = 0 on a real package), so the ten filenames
come back and nothing else. Both facts are now in the function's comment.
- **The embedded smoke test was made a function and called twice**, once per
layout: the host platform package out of `extension/bin/`, the all-platforms
package out of `extension/bin/darwin-arm64/`. That is the difference that
matters — a fat package whose binaries were staged one directory too deep
would package, assert fine, and then fail to spawn for every user; driving a
real LSP session out of the nested path is what rules that out.
- **`tools/prune_release_assets.sh`** is new and is the CI-flow half of the
round; it is logged in full in `docs/features/ci-release/README.md`. The
handshake it creates with this feature — the seven exact package names — is
now in Handshakes above.
- Did not bump any version, did not `git commit`/`git push`, did not touch
`CHANGELOG.md` or `crates/`. `TODO.md` was read again; §6's editor-packaging
and release-prep items are still `[x]` and still say nothing about the package
matrix, so nothing was checked off.
**Validation, all from the real repo path (never the scratchpad — `vsce`
collects zero files there, `docs/features/editor-packaging` QA Finding 2):**
| Check | Result |
|---|---|
| `bash -n` on `release.sh`, `audit_artifacts.sh`, `prune_release_assets.sh` | clean |
| `node --check editors/vscode/extension.js` | clean |
| `cargo fmt --check` | clean |
| `cargo clippy --all-targets` | clean, 0 warnings |
| `cargo test -p lucisv_server` | **1015 unit + 50 e2e + 3 grammar**, 5 ignored, 0 failed |
| `tools/release.sh --cross` | exit 0 — 12 loose binaries + **7** `.vsix` + `SHA256SUMS`, every `bin/ contents ok` |
| `tools/release.sh -o target/relcheck-dist` (no `--cross`) | exit 0 — host pair, universal `.vsix`, `darwin-arm64` `.vsix`, `SHA256SUMS`, **no `-all.vsix`**, one embedded smoke test rather than two |
| `tools/audit_artifacts.sh dist` | **12 binaries audited, exit 0** — the 7 `.vsix`, `-all` included, all skipped by the `*.vsix` arm before the "unrecognized artifact name" arm sees them |
| `shasum -a 256 -c SHA256SUMS` in `dist/` | 19/19 OK |
| embedded smoke, host platform package (`extension/bin/`) | `smoke: OK`, 10 messages |
| embedded smoke, all package (`extension/bin/darwin-arm64/`) | `smoke: OK`, 10 messages |
**`lucisv-0.10.1-all.vsix` — what is actually in it**, checked rather than
assumed:
- **Exactly ten `extension/bin/` entries**, no more: `darwin-arm64/`,
`darwin-x64/`, `linux-x64/`, `linux-arm64/` each with `lucisv` and
`lucisv-server`, `win32-x64/` with the two `.exe`s. Mode `-rwxr-xr-x` inside
the zip for all ten.
- **All ten are byte-identical to the audited loose binaries.** Compared by
SHA-256 of `unzip -p` output against `dist/lucisv[-server]-0.10.1-<triple>`
for all five triples, both binaries each — ten of ten match. So the audit that
gates the release covers what is inside this package too, transitively, the
same way it does for the platform packages.
- **No `TargetPlatform`** in its `extension.vsixmanifest` (checked), which is
what makes VS Code offer it to any machine — Alpine included.
- Size 13,025,877 bytes against 2,987,672 for `darwin-arm64` and 754,239 for the
universal package. The "13.0 MB vs 3.0 MB" in the section above is that
measurement, not an estimate.
- The universal package still carries **no** `bin/` — `unzip -Z1
lucisv-0.10.1.vsix 'extension/bin/*'` answers "filename not matched". It is
asserted at build time by `expect_vsix_bins` with an empty expected set, and
it is packaged before anything is staged, so nothing built later can reach
back into an already-written zip.
**The extension's layered lookup was exercised, not only read.** The extension
host is still the only place `require('vscode')` resolves, so I wrote a harness
that stubs `vscode` and `vscode-languageclient/node` through
`Module._load`, hands `activate()` a `context` whose `asAbsolutePath` points at
a fake extension directory, and reads back the `command` the `LanguageClient`
was constructed with. Thirteen assertions, all passing:
| Fake package | Resolved to |
|---|---|
| no `bin/` at all | `lucisv-server` (PATH) |
| flat `bin/` | `bin/lucisv-server` |
| `bin/darwin-arm64/` | `bin/darwin-arm64/lucisv-server` |
| both layouts present | the **flat** one — most specific first |
| only a foreign platform's directory | `lucisv-server` (PATH) |
| `bin/darwin-arm64/` + a user `serverPath` | the user's path |
plus: both binaries come out `0755` in the flat and the nested layouts **and**
when a user setting won the spawn (the lead's unconditional-chmod fix from round
1 still holds in the nested layout), and a directory for another platform is
left at `0644` — we do not chmod what we did not choose. This proves the file
resolution and the chmod, and nothing about how VS Code behaves around it.
**The `EXIT` trap was negative-controlled against the new nested staging**, not
assumed to still work: a fake `npx` on `PATH` proxying to the real one except
when an argument ends in `-all.vsix`, where it exits 23. `tools/release.sh -o
target/relfail --cross` built the universal package and all five platform
packages (each asserted `bin/ contents ok`), then died on the all package with
exit 23 — and `editors/vscode/bin/` was gone afterwards, five subdirectories and
ten binaries included, with `git status --short editors/vscode` showing only
this round's edits. A failure in the fat-package path cannot leave 13 MB of
binaries in the working tree.
**Not verified, honestly:**
- **No package was installed into a real VS Code**, so which package the
marketplace/`code --install-extension` hands a given machine, and whether the
extension host's `context.asAbsolutePath` behaves as the harness stubs it, are
still unproven here. Unchanged limitation since 2026-08-19.
- **The Alpine claim is reasoning, not an observation.** It rests on two facts I
did not test on an Alpine box: Node reports `process.platform === 'linux'`
there (it does not distinguish libc), and VS Code on Alpine requests
`alpine-x64`/`alpine-arm64` from a marketplace. Both are documented behaviour,
and the second one is moot for a package with no `TargetPlatform` — but nobody
here has watched an Alpine VS Code start our server.
- **The Linux and Windows binaries inside the fat package have never been
executed**, same as the loose ones and the platform packages. Only the
`darwin-arm64` directory's server has been spawned.
- **`x86_64-unknown-linux-gnu` is still in no package**, fat one included: the
fat package carries the same five platforms the targeted packages do.
- **A concurrent round was editing the tree.** `editors/vscode/package.json` and
`editors/vscode/images/` were being changed by another agent (marketplace
metadata, `docs/features/editor-marketplace-page/`) while these runs happened;
one intermediate run of mine failed on *their* half-landed `"icon"` field
before `images/icon.png` existed, which is a race between two agents and not a
finding about either change. The numbers quoted above are from a final
`--cross` run made after that settled, so they describe the tree as it stands.
I did not touch either of their files.
**`editors/vscode/README.md` was written twice, and the second version is the
one that survives — lead, this file has two rounds in it.** I first updated the
old developer-facing README as this round asked: §0 gained the all-platforms
package, the bundled-binary sentence covered both layouts, the
`lucisv.serverPath` settings row and the Troubleshooting entry stopped naming
only the universal package. The `editor-marketplace-page` round then **deleted
that file** mid-round and replaced it, 70 seconds later, with a complete
marketplace-audience rewrite — taking those edits with it. I did not restore my
version over theirs; theirs is the better file for its audience and clobbering a
finished rewrite to recover four paragraphs would be the wrong trade. Instead I
re-applied the *requirement* onto their structure, additively and in their
voice: an `all` row in their install table, a paragraph on when to pick it (with
the Alpine reason and the 13 MB-vs-3 MB cost) and where the binaries sit in each
layout, and one clause in their "Release 0.10.1 highlights" list. Their
`lucisv.serverPath` row already reads "bundled" and their Troubleshooting entry
already avoids naming the universal package, so those two needed nothing. The
standing requirement is in Handshakes above for whoever edits that file next.
If the lead lands only one of the two rounds, note the dependency: their README
now names a package that only *this* round's `release.sh` builds.
## QA log
### 2026-08-27 — QA agent
Scope: everything the dev's work log claims — gates, `--cross` and non-`--cross`
`release.sh` runs, `.vsix` contents, `TargetPlatform`, `SHA256SUMS`,
`audit_artifacts.sh`'s new aarch64 arm, `extension.js`'s resolution order and
`inspect()` usage, the `EXIT` trap, and the docs. Ran everything from the real
repo path (`/Users/guoliangchen/repo/verilogrustformatter`), never the session
scratchpad (`docs/features/editor-packaging` QA Finding 2). All work in this
entry; no source file was edited.
**Gates — all green, matching the dev's numbers exactly.**
| Check | Result |
|---|---|
| `bash -n tools/release.sh tools/audit_artifacts.sh` | clean |
| `node --check editors/vscode/extension.js` | clean |
| `python3 -c json.load` on `package.json` | valid |
| `cargo fmt --check` | clean |
| `cargo clippy --all-targets` (workspace) | clean, 0 warnings |
| `cargo test -p lucisv_server` | **1015 unit + 50 e2e + 3 grammar**, 5 ignored, 0 failed — exact match |
| `cargo test --workspace` | all green (also run, not just the dev's subset) |
**`tools/release.sh --cross`, re-run independently — exit 0, 18 artifacts, matching the claimed set exactly.**
- `dist/` after the run: 12 loose binaries (six triples × 2), 6 `.vsix`, `SHA256SUMS` — file names and sizes match the dev's table (`lucisv-server-0.10.0-aarch64-unknown-linux-musl` 4,022,088 bytes, `lucisv-0.10.0-aarch64-unknown-linux-musl` 1,930,768 — identical to the dev's numbers).
- `shasum -a 256 -c SHA256SUMS` in `dist/`: **18/18 OK**.
- `unzip -Z1`/`unzip -Z` on all six `.vsix`, independently: the universal package (`lucisv-0.10.0.vsix`, 324 entries) carries no `extension/bin/*` entries and no `TargetPlatform` attribute in `extension.vsixmanifest`. Each of the five platform packages (326 entries — exactly 2 more than universal) carries exactly `extension/bin/lucisv{,-server}` (`.exe` suffix on `win32-x64`), mode `-rwxr-xr-x` inside the zip, and the correct `TargetPlatform="…"` (`darwin-arm64`, `darwin-x64`, `linux-x64`, `linux-arm64`, `win32-x64` respectively — checked all five, not just one).
- Grepped every `.vsix`'s file list for `smoke`, `.gitignore`, `.vscodeignore`, `test`, `.git/`: nothing found in any of them — no dev-only clutter shipped.
- `tools/audit_artifacts.sh dist`: **12 binaries audited, exit 0** — matches exactly (the six `.vsix` are correctly skipped by the pre-existing `*.vsix` case arm, not part of this round's diff).
- Embedded smoke test ran as part of the build: `smoke: OK` against the server unzipped out of the `darwin-arm64` package, 10 messages — matches.
**`tools/release.sh` without `--cross`, re-run into a throwaway `-o` dir:** exactly host pair + `lucisv-0.10.0.vsix` (universal) + `lucisv-0.10.0-darwin-arm64.vsix`, 4 files total, `editors/vscode/bin/` absent afterward. Matches the "What gets built" table exactly.
**Breaking it, independently (not reusing the dev's own runs):**
1. **Ran `release.sh` twice in a row** (non-`--cross`, into two different `-o` dirs). Both exit 0, `editors/vscode/bin/` absent after each run, identical artifact name sets both times, `git status --short editors/vscode` showed only this round's four intended edits both times — no residue from run 1 leaking into run 2.
2. **Pre-existing junk in `editors/vscode/bin/` before a run.** Created `editors/vscode/bin/lucisv-server` and `editors/vscode/bin/some-other-file` with garbage content by hand, then ran `release.sh -o /tmp/relcheck3 --no-vsix`. The script's `rm -rf "$bin_dir"` at line 53 (before the first build, unconditional on `--no-vsix`) wiped it; `bin/` was absent afterward and the run succeeded normally. A stale `bin/` from an interrupted prior run cannot contaminate the next one.
3. **Independently re-ran the `EXIT`-trap negative control**, with my own fake `npx` (not the dev's), rather than trusting the dev's own report: a wrapper script on `PATH` that proxies to the real `npx` for everything except an invocation containing `--target`, which it fails with exit 17. Ran `release.sh -o /tmp/relcheck_fail`: the universal package built and was asserted clean (`bin/ contents ok`), then the `darwin-arm64` package's `vsce package --target darwin-arm64` hit the fake npx and failed; the script exited 17. `editors/vscode/bin/` was absent afterward and `git status --short editors/vscode` showed only the four intended edits — the trap covers a real mid-packaging failure, checked with a genuinely different negative control than the dev used, not a re-run of theirs.
**Audit script — the aarch64-musl arm checked adversarially.**
- **Unknown artifact name still fails**, confirmed on a copy: `lucisv-0.10.0-unknown-triple-xyz` (a renamed copy of the real `aarch64-apple-darwin` binary) produces `FAIL: … unrecognized artifact name — teach this script about it`, exit 1.
- **Corrupted the aarch64-musl arm**, on a copy, never on `dist/` originals: overwrote a copy of `lucisv-server-0.10.0-aarch64-unknown-linux-musl` with `/bin/ls` (a Mach-O binary) under the same aarch64-musl-suffixed name. Audit failed it twice over — `not an aarch64 ELF: Mach-O universal binary …` and `musl build is not statically linked: …` — before even reaching the `objdump` `NEEDED` check, and exited 1 overall. This proves the arm's `file`-based architecture/static checks fire on a corrupted artifact, but it is a weaker test than I wanted: **I did not manage to isolate the `objdump -p … | grep NEEDED` line specifically** (no genuine dynamically-linked aarch64 Linux ELF was available on this Mac to substitute in — the closest available wrong-arch swap fails at the earlier `file`-based checks first, so the `NEEDED` grep is never reached in this control). The two checks are independent by construction (read separately in the source, matching the "two independent opinions" comment at `tools/audit_artifacts.sh:56`), so I read the `NEEDED` branch by inspection rather than exercising it in isolation — noting this as an honest gap in my own coverage, not a defect found.
**`extension.js` resolution logic, read line by line against the claims.**
- **`inspect()` scope order verified correct against VS Code's own documented precedence** (`SERVER_PATH_SCOPES`, `extension.js:58-65`) — not assumed from memory. VS Code's own `vscode.d.ts` doc comment for `WorkspaceConfiguration.inspect()` states the effective-value merge order, lowest to highest, as: `defaultValue`, `globalValue`, `workspaceValue`, `workspaceFolderValue`, `defaultLanguageValue`, `globalLanguageValue`, `workspaceLanguageValue`, `workspaceFolderLanguageValue`. That means *every* language-specific value outranks *every* non-language-specific one — a genuinely counter-intuitive rule (a `[verilog]`-scoped **User** setting beats a plain **workspace folder** setting) that I checked rather than trusted. Reversed and excluding the two `default*` entries (correctly excluded — see the file's own comment), the highest-to-lowest order is exactly `workspaceFolderLanguageValue, workspaceLanguageValue, globalLanguageValue, workspaceFolderValue, workspaceValue, globalValue` — which is the code's list, verbatim, in that order. The claim is correct.
- **The bundled-CLI call is unconditional; the bundled-server call is short-circuited — worth documenting, not a bug (Finding 1 below).**
- **`chmodSync` is in a `try { } catch { }` with no binding** (`extension.js:104-109`) — cannot throw uncaught; a read-only install or permission error is swallowed exactly as the comment says.
- **`deactivate()`** (`extension.js:211-214`) is untouched by this round's diff (confirmed via `git diff HEAD~1`) and still calls `clearTimeout` + `client.stop()`.
- **Windows `.exe` suffix** is handled consistently in both `bundledBinary()` (`extension.js:100`, via `process.platform === 'win32'`) and `release.sh`'s `package_vsix`/loose-binary loops (`case $triple in *windows*) exe=.exe ;;`) — same convention, both places.
- **Activation with `bin/` absent (the universal package) does not throw**: `bundledBinary` returns `undefined` via `fs.existsSync` before any chmod attempt, and the `||` chain falls through to `'lucisv-server'` on `PATH`, exactly as before this round. `git diff HEAD~1 -- editors/vscode/extension.js` confirms the entire diff is additive (two new `require`s, two new functions, and the `activate()` server-path line) — the pre-existing behavior for the universal package's happy path is untouched code, not just untouched behavior.
**Finding 1 (confirmed, cosmetic, not blocking) — `editors/vscode/README.md:29`'s "makes both executable on first activation" is not quite true when a user has set `lucisv.serverPath`.**
`extension.js:120` calls `bundledBinary(context, 'lucisv')` unconditionally, so the CLI is always chmod'ed if present. But `extension.js:124` is
```js
const serverPath = userServerPath() || bundledBinary(context, 'lucisv-server') || 'lucisv-server';
```
— plain JavaScript `||` short-circuits, so if `userServerPath()` returns a truthy value (the user set `lucisv.serverPath` in any of the six scopes `SERVER_PATH_SCOPES` checks), `bundledBinary(context, 'lucisv-server')` is **never called**, and the bundled `bin/lucisv-server` is never chmod'ed on that activation. This is not a functional bug — the binary in question is not the one being spawned in that scenario, so its mode is irrelevant — but `editors/vscode/README.md:29`'s "the extension spawns the server from there and makes both executable on first activation" states an unconditional "both" that has this one exception. The feature README's own Handshakes section is more careful — "chmods what it is about to spawn" (line 46) — which is the actually-accurate description and does not have this gap. Recommend loosening `README.md:29`'s wording to match the feature README's, or noting the exception; not fixed here since it is a one-clause doc-precision issue, not a typo, and the instructions ask QA to file rather than redesign.
**Pre-existing, out of scope for this round, flagged for the lead anyway — `tools/RELEASING.md:229-231` has a garbled sentence in the Appendix**, predating this round (confirmed via `git diff HEAD~1 -- tools/RELEASING.md`; the Appendix section is untouched by this diff): "that id registered with vsce by the owner\n has created in the Visual Studio Marketplace." reads as a broken edit — a clause was apparently left mid-rewrite. Not this feature's doc to fix (it's about marketplace publishing, unrelated to platform packaging), and not introduced by this round, but noted since I read the whole file.
**Docs cross-checked against reality, no other issues found:**
- `tools/RELEASING.md`'s `.vsix`-in-detail section (staging, `--target` invocation shape, `bin/` transience, the `unzip -Z1` assertion contract) matches `release.sh`'s actual code line for line.
- `editors/vscode/README.md`'s section 0 install instructions, the `lucisv.serverPath` settings-table row, and the Troubleshooting section's "clear the setting, don't set it back to the default string" advice all match `extension.js`'s actual behavior (the last one specifically depends on the `inspect()`-not-`get()` distinction verified above — a user who explicitly sets `lucisv.serverPath` to the literal string `"lucisv-server"` does still count as "set", by design, since `inspect()` sees it in a scope, not as the manifest default).
- The feature README's own Handshakes ("Promised to `extension.js`", "Promised to `tools/audit_artifacts.sh`") match what the code actually does, verified independently above rather than taken on the doc's word.
- `TODO.md` was not re-checked in depth; the dev's claim that no existing checkbox needed updating was not disputed by anything found here.
**No BLOCKING findings.** Every claim in the dev's work log was independently reproduced with fresh runs and, where possible, fresh negative controls rather than re-trusting the dev's own — gates, both `release.sh` modes, all six `.vsix` contents (all five `TargetPlatform`s, not a sample), `SHA256SUMS`, the `EXIT` trap (with an independently-written stub), the audit script's new arm, and the `inspect()` precedence claim (checked against VS Code's own documented merge order, not memory). Finding 1 is cosmetic and already partially self-corrected by the feature README's own more careful wording elsewhere. The un-exercised `NEEDED`-check branch (audit script) is a coverage gap in this QA pass, not a defect — recorded honestly rather than papered over.
**Verdict: ship.**
### 2026-08-27 — QA agent (round 2): the all-platforms package + CI consolidation
Scope: the dev's round-2 work log claims only — the seventh `lucisv-<v>-all.vsix`
package, `extension.js`'s layered `bundledBinary` lookup, `release.sh`'s
`package_all_vsix`/`expect_vsix_bins` under `--cross`, `tools/prune_release_assets.sh`,
and the `release.yml` step that calls it. Did not re-review the earlier
six-package round (its own QA log entry above stands) or the concurrent
`editor-marketplace-page` round, except where its output could break packaging.
Ran everything from the real repo path (`/Users/guoliangchen/repo/verilogrustformatter`),
never the scratchpad. No source file was edited; `dist/` was rebuilt by my own
`--cross` run and left intact afterward (verified: 20 files, `shasum -c` 19/19
OK, as the last action before writing this entry).
**Gates — all green.**
| Check | Result |
|---|---|
| `bash -n tools/release.sh tools/audit_artifacts.sh tools/prune_release_assets.sh` | clean |
| `node --check editors/vscode/extension.js` | clean |
| `python3 -c "import yaml; yaml.safe_load(...)"` on `.gitea/workflows/release.yml` | valid |
| `cargo fmt --check` | clean |
| `cargo clippy --all-targets` | clean, 0 warnings |
| `cargo test -p lucisv_server` | **1015 unit + 50 e2e + 3 grammar**, 5 ignored, 0 failed — exact match to the dev's numbers |
**`tools/release.sh --cross`, re-run independently on this machine (lucisv 0.10.1) — exit 0, 12 loose binaries + 7 `.vsix` + `SHA256SUMS` (20 files, 19 checksummed entries), matching the dev's claimed set.**
- `unzip -Z1 lucisv-0.10.1-all.vsix 'extension/bin/*'`: exactly 10 entries — `darwin-arm64/`, `darwin-x64/`, `linux-x64/`, `linux-arm64/` each with `lucisv`+`lucisv-server`, `win32-x64/` with `lucisv.exe`+`lucisv-server.exe` only (`.exe` confirmed absent from the other four directories). `unzip -Z1 ... | grep -c '/$'` = 0, confirming vsce writes no directory entries here either.
- Universal package still has no `bin/`: `unzip -Z1 lucisv-0.10.1.vsix 'extension/bin/*'` → "filename not matched". The five platform packages are unchanged — flat two entries each (`extension/bin/lucisv[-server]`, `.exe` only for `win32-x64`).
- `extension.vsixmanifest`: no `TargetPlatform` attribute in `lucisv-0.10.1-all.vsix` or the universal package; `TargetPlatform="darwin-arm64"`/`"darwin-x64"`/`"linux-x64"`/`"linux-arm64"`/`"win32-x64"` present and correct in the respective five platform packages (checked all five).
- Both embedded smoke tests ran during the build: `smoke: OK`, 10 messages, for the host platform package (`extension/bin/`) and for the all package (`extension/bin/darwin-arm64/`).
- `tools/audit_artifacts.sh dist`: 12 binaries audited, exit 0.
- `shasum -a 256 -c SHA256SUMS` in `dist/`: 19/19 OK.
- `dist/` left intact at the end (re-verified after all later runs used throwaway `-o` dirs or copies).
**Byte-identity spot-check, `all` package vs. loose `dist/` binaries (SHA-256, both directions of the pair, two platforms as asked):**
- `darwin-arm64`: `unzip -p lucisv-0.10.1-all.vsix extension/bin/darwin-arm64/lucisv` and `extension/bin/darwin-arm64/lucisv-server` both hash identically to `dist/lucisv-0.10.1-aarch64-apple-darwin` and `dist/lucisv-server-0.10.1-aarch64-apple-darwin` (`51ca1cf2...` and `edaff0df...` respectively).
- `win32-x64`: `unzip -p lucisv-0.10.1-all.vsix extension/bin/win32-x64/lucisv.exe` and `.../lucisv-server.exe` both hash identically to `dist/lucisv-0.10.1-x86_64-pc-windows-gnu.exe` and `dist/lucisv-server-0.10.1-x86_64-pc-windows-gnu.exe` (`f6c2dbfc...` and `6628bfeb...` respectively).
Four of four match. Confirms the audit that gates the release covers the fat package's contents transitively, as claimed.
**`tools/prune_release_assets.sh`, on copies of `dist/`, never the original — independent runs, not the dev's.**
- **Positive**: copied the full 20-file `dist/` to a scratch dir, ran `prune_release_assets.sh <dir> 0.10.1` — exit 0, 8 survivors (the 7 `.vsix` + `SHA256SUMS`), `shasum -c` re-verify inside the script passed for all 7.
- **Negative, missing `-all.vsix`**: removed it from a fresh copy before running — `missing lucisv-0.10.1-all.vsix` on stderr, exit 1, **file count unchanged (19 before and after)** — the name-check loop runs entirely before any deletion, so a missing package deletes nothing rather than partially pruning.
- **Negative, wrong version arg**: ran with `9.9.9` against the real 0.10.1 tree — `missing lucisv-9.9.9.vsix`, exit 1, file count unchanged (20 before and after, since this copy still had its original `dist/` contents).
- **Negative, missing directory**: ran against a nonexistent path — `no dist directory at ...`, exit 2, as coded.
**`extension.js`'s layered `bundledBinary` lookup — exercised with my own harness, not the dev's** (none was left in the tree to re-run; confirmed via `find` and `git status --short`, which shows no untracked harness file). Wrote an independent Node script (`/tmp/qa_ext_harness/harness.js`, discarded after use) that stubs `vscode` and `vscode-languageclient/node` via `Module._load`, builds fake extension directories with `fs`, and calls `activate()` against a fake `context.asAbsolutePath`, reading back `serverOptions.command` from the `LanguageClient` constructor call and the on-disk file modes afterward. Eight cases, all matching the documented behaviour:
| Case | Result |
|---|---|
| no `bin/` at all | `lucisv-server` (PATH) |
| flat `bin/` only | flat path, chmod 755 |
| nested `bin/<own-platform>/` only | nested path, chmod 755 |
| both layouts present | **flat** wins (most specific first); flat chmod'ed to 755, **nested left at 644 — not touched** |
| only a foreign platform's directory present | falls through to `lucisv-server` (PATH) |
| nested layout + user `serverPath` set (`globalValue`) | **user's path wins the spawn**, but the nested bundled server is **still chmod'ed to 755** — confirms the lead's round-1 fix (unconditional `bundledServer` resolution ahead of the `\|\|` chain) survived the new two-candidate lookup |
| flat layout + user `serverPath` set to the literal string `"lucisv-server"` | counts as "set" (per `inspect()`, not `get()`); command resolves to that string, flat binary still chmod'ed |
| nested layout + user `serverPath` set to a whitespace-only string | counts as unset; falls through to the nested bundled path |
This independently confirms: flat-over-nested precedence, foreign-platform fall-through, the "only chmod what was chosen" behavior the dev's own harness claimed, and — the specific thing this round's instructions flagged as a prior finding to re-check — that both bundled binaries still get chmod'ed even when a user-set `serverPath` wins the spawn, in the nested layout as well as the flat one.
**`EXIT` trap, negative-controlled a third way** (independently of both the round-1 QA control and the dev's round-2 control): a fake `npx` on `PATH` that fails only when an argument ends in `-all.vsix` (exit 42), proxying to the real `npx` otherwise. `tools/release.sh -o /tmp/qa_relfail --cross` built the universal package and all five platform packages (each asserted `bin/ contents ok`) before dying on the all-platforms step; `editors/vscode/bin/` (which by then holds five subdirectories, ten binaries) was gone immediately after, and `git status --short editors/vscode` showed only this round's four tracked-file edits — no residue.
**Docs vs. reality.**
- `tools/RELEASING.md`'s "twelve binaries and seven `.vsix` files" claim, the `.vsix`-in-detail section's staging/assertion description, and the publishing section's "seven `.vsix` packages plus `SHA256SUMS`" all match the actual `--cross` output above.
- `docs/features/ci-release/README.md`'s seven-package claims, its `prune_release_assets.sh` validation table (20-file copy → 8 survivors, missing `-all.vsix` → exit 1 deletes nothing), and its description of the `release.yml` step order all match what I independently reproduced above.
- `.gitea/workflows/release.yml` calls the script as `tools/prune_release_assets.sh dist "${GITHUB_REF_NAME#v}"`, between the artifact audit and the release-notes extraction — confirmed by reading the file; `RELEASE_NOTES.md` is written into `dist/` *after* pruning, so the prune step (which deletes everything not `*.vsix`/`SHA256SUMS`) cannot touch it.
- Top-level `README.md` (lines 623, 710) states the `all` package and the seven-package release claim; both match reality.
- `tools/audit_artifacts.sh`'s `*.vsix | SHA256SUMS | RELEASE_NOTES.md` skip arm (line 39) still covers `-all.vsix` before the "unrecognized artifact name" arm — confirmed by the clean 12-binary audit above.
- `editors/vscode/.vscodeignore` still does not exclude `bin/`; `editors/vscode/.gitignore` still ignores it with a comment pointing at this feature.
**Finding 1 (confirmed, moderate, not blocking build/packaging) — `editors/vscode/README.md`'s install table names six packages, not the seven this feature's own Handshakes section promises.**
This feature's Handshakes section (`docs/features/editor-platform-vsix/README.md:103-104`, written by the dev in this same round) states as a requirement of `editor-marketplace-page`'s rewrite: "its install table naming **seven** packages, not six (the five platform ones, `all`, and the universal fallback)". The dev's own round-2 work log (lines 552-558) claims to have "re-applied the *requirement* onto their structure" and that the marketplace README's `lucisv.serverPath` row and Troubleshooting entry "already" satisfied the requirement, needing no change — but does not claim to have added the universal package to the install table, and it was never there. Checked directly: `editors/vscode/README.md:36-43`'s install table has exactly six rows (`darwin-arm64`, `darwin-x64`, `linux-x64`, `linux-arm64`, `win32-x64`, `all`); `grep -n "universal\|lucisv-<version>\.vsix\|PATH\\b" editors/vscode/README.md` finds no mention of the universal/platform-independent package anywhere in the file — not in the install table, not in Troubleshooting, not elsewhere. A reader of this developer-facing README has no way to learn the plain `lucisv-<version>.vsix` (PATH-based, smallest download, the fallback for a platform none of the six named packages cover) exists at all. This does not break packaging or any gate — `vsce package` for the universal target still runs and is still asserted `bin/`-free by `release.sh` — it is purely a documentation gap against the feature's own stated (and, per the work log, believed-satisfied) handshake. Filed rather than fixed, per QA's scope (verify, don't redesign); the fix is one added table row plus a clause, in `editor-marketplace-page`'s voice, matching the pattern already used for the `all` row.
**No other findings.** Every claim in the dev's round-2 work log — the seventh package's build and contents, the layered lookup and its chmod behavior (including the specific "still chmod'ed when a user setting wins" fix-survival check this round asked for), `expect_vsix_bins`'s handling of nested paths, the `EXIT` trap under the new nested staging, `prune_release_assets.sh`'s positive and negative behavior, and the docs — was independently reproduced with fresh runs, fresh negative controls, and a fresh harness rather than re-trusting the dev's own. The concurrent `editor-marketplace-page` round's `package.json` changes (icon, keywords, homepage) do not break packaging: the full `--cross` run above packaged all seven `.vsix` cleanly against the current tree, icon file present and valid.
**Verdict: ship, with Finding 1 (moderate, doc-only) for the lead to route — either fix `editors/vscode/README.md`'s install table now or hand it back to `editor-marketplace-page`.**
## Review
**2026-08-27 — lead. Verdict: accepted; commits with this round.**
Reviewed the full diff (7 files + this README), the dev's work log against the
scripts' actual code, and QA's independent reproduction. Points reviewed and
accepted:
1. **The staging design is the right shape**: `editors/vscode/bin/` exists only
between `mkdir` and the post-package `rm -rf`, with an `EXIT` trap both
agents negative-controlled independently, and every package's `bin/`
contents asserted with `unzip -Z1` rather than assumed. The failure this
guards against — one platform's server shipping inside another platform's
package, or inside the universal one — is a corruption-adjacent class of
bug, and it cannot happen silently.
2. **The resolution order in `extension.js` is correct and honestly detected**:
`inspect()` across all six user-writable scopes, in VS Code's own merge
order (QA verified the order against documentation, including the
language-scoped-beats-general rule), with the manifest default deliberately
not counting as "set". The chmod-in-try/catch matches rust-analyzer's
long-standing practice for the same VSIX-extraction reality.
3. **`linux-x64` shipping musl is the right call** — a static server is what an
extension installed by a stranger needs — and the gaps are recorded rather
than hidden: no `x86_64-unknown-linux-gnu` package, no Alpine targets
(universal fallback covers them), four non-host packages never executed on
their own platforms.
4. **QA's Finding 1** (short-circuited chmod of the unused bundled server) was
fixed at the code level by the lead — see the work log — so the user-facing
README's "both" is now unconditionally true. **Finding 2** (garbled
pre-existing sentence in the RELEASING.md appendix) is real, predates this
round, and is fixed by the lead in this same round. QA's disclosed coverage
gap (the aarch64 `NEEDED` branch never fired against a genuine dynamic
aarch64 ELF) is accepted: the branch is nine lines, read by three agents,
and structurally identical to the x86-64 arm that *was* mutation-tested.
No version bump here: the packages are cut from whatever version the tree is
at, and the next tagged release ships all six automatically via the unchanged
`release.yml` → `release.sh --cross` path.
**2026-08-27 — lead review of round 2 (the all-platforms package + CI
consolidation). Verdict: accepted; commits with this round; ships as 0.10.2.**
Reviewed the diff, the dev's work log, and QA's independent reproduction
(its own Node harness for the layered lookup, its own `EXIT`-trap stub, a
fresh `--cross` run, byte-identity spot-checks). Points accepted:
1. **The layered `bundledBinary` lookup is the smallest correct shape**: the
file's existence remains the only runtime test for "which package am I",
the flat layout wins so a platform package can never accidentally pick a
foreign binary out of a fat layout, and the prior round's
chmod-both-binaries fix survives (QA proved it with a user-set
`serverPath` against a nested layout).
2. **The `-all` package is target-less on purpose** — no `TargetPlatform` in
its manifest, asserted by `release.sh` — which is precisely what makes it
the honest answer for Alpine and any platform vsce refuses to name.
3. **`tools/prune_release_assets.sh` consolidates the release contract in
one place**: seven names checked, audited hashes preserved by filtering
rather than recomputing, deletion only after every check passes (QA's
negative controls confirm a failure deletes nothing).
4. **QA's Finding 1** (the marketplace rewrite dropped the universal package
from the install table, breaking this round's requested Handshake) was
fixed by the lead in the marketplace round's review — a seventh row names
the universal fallback.
Accepted limitations, unchanged from round 1: no real-editor run, four
non-host platforms' binaries never executed, Alpine reasoned not observed.
+3
View File
@@ -1,2 +1,5 @@
node_modules/
*.vsix
# Staged by tools/release.sh, one platform at a time, and removed again after
# each package: docs/features/editor-platform-vsix. Never checked in.
bin/
+262 -211
View File
@@ -1,236 +1,287 @@
# lucisv for VS Code
<p align="center">
<img src="https://git.luci.ooo/lucio/lucisv/raw/branch/master/editors/vscode/images/icon.png" width="128" height="128" alt="lucisv waveform icon">
</p>
A thin extension: it registers the Verilog/SystemVerilog file types and starts
`lucisv-server`. Every *analysis* feature you see — formatting, diagnostics,
semantic highlighting, hover, go-to-definition, references, symbols — comes
from the server, so this directory contains no language logic and no
editor-specific commands. The two exceptions are the snippet library and the
TextMate grammar below, both static data VS Code reads straight from the
manifest — LSP has no channel for either. See
`docs/features/lucisv-server/README.md` for the capability list,
`docs/features/editor-packaging/README.md` for why the extension looks like
this, and `docs/features/editor-snippets/README.md` for the snippets.
<h1 align="center">lucisv for VS Code</h1>
## 1. Build the server
<p align="center">
Fast, coherent Verilog and SystemVerilog tooling—from the first keystroke to a workspace-wide refactor.
</p>
```bash
cargo build --release # from the repo root; binary at target/release/lucisv-server
```
<p align="center">
<img alt="Verilog 2001" src="https://img.shields.io/badge/Verilog-2001-38E8C5?style=flat-square&labelColor=07111F">
<img alt="SystemVerilog" src="https://img.shields.io/badge/SystemVerilog-supported-5BC0FF?style=flat-square&labelColor=07111F">
<img alt="LSP 3.18" src="https://img.shields.io/badge/LSP-3.18-A98BFF?style=flat-square&labelColor=07111F">
<img alt="Rust powered" src="https://img.shields.io/badge/core-Rust-FFB45B?style=flat-square&labelColor=07111F">
<img alt="MIT licensed" src="https://img.shields.io/badge/license-MIT-FF6F91?style=flat-square&labelColor=07111F">
</p>
Put it on your `PATH`:
lucisv brings formatting, live diagnostics, syntax and semantic highlighting,
code navigation, design hierarchy, snippets, completion, and safe refactoring
to `.v`, `.vh`, `.sv`, and `.svh` files. The extension and its bundled
language server are two halves of one toolchain, backed by the same Rust parser,
formatter, linter, semantic model, and workspace index.
```bash
cp target/release/lucisv-server ~/.local/bin/ # or wherever your PATH points
```
![lucisv feature map](https://git.luci.ooo/lucio/lucisv/raw/branch/master/editors/vscode/images/feature-map.png)
Or leave it in `target/release` and point the extension at it with the
`lucisv.serverPath` setting (below).
## Install
## 2. Smoke-test the spawn contract (no editor needed)
Install **lucisv — Verilog/SystemVerilog** from the VS Code Extensions view,
then open a Verilog or SystemVerilog file. There is no separate server or CLI
setup.
`smoke.js` spawns the server exactly the way `extension.js` does — same
argument list (none), same cwd, same inherited environment — and drives a full
`initialize` / `didOpen` / `shutdown` / `exit` session over stdio with
hand-rolled `Content-Length` framing. Plain `node`, no dependencies.
The current release is **0.10.2**. Its platform packages include both
`lucisv-server` and the `lucisv` command-line tool:
```bash
node smoke.js # `lucisv-server` from PATH
node smoke.js ../../target/release/lucisv-server # an explicit binary
```
| Package target | Machines |
|---|---|
| `darwin-arm64` | Apple Silicon macOS |
| `darwin-x64` | Intel macOS |
| `linux-x64` | x64 Linux, statically linked |
| `linux-arm64` | Arm64 Linux, statically linked |
| `win32-x64` | x64 Windows |
| `all` | All five of the above in one package, chosen when it starts |
| *(no suffix)* | Universal fallback for any other platform — carries no binaries and runs `lucisv-server` from `PATH` |
It prints `smoke: OK — …` and exits 0, or names the failure and exits 1. Run it
after every server change and before packaging: it is the only check that
catches "the binary moved" or "the handshake broke" without launching VS Code.
If you install directly from the
[0.10.2 release](https://git.luci.ooo/lucio/lucisv/releases/tag/v0.10.2),
choose the `.vsix` whose suffix matches your machine. VS Code normally chooses
the matching Marketplace target automatically.
## 3. Install the extension
Take the `all` package when the machine is not known in advance — a mixed fleet,
one file on an internal mirror, or Alpine, which VS Code never offers a Linux
package to even though the statically linked Linux binaries run there. It costs
a larger download (about 13 MB against 3 MB) and nothing else. Inside a platform
package the binaries sit at `bin/lucisv-server` and `bin/lucisv`; inside the
`all` package they sit one level deeper, under `bin/<platform>-<arch>/`. Either
way the extension finds them and makes them executable on first activation.
```bash
npm ci # installs vscode-languageclient (the only dependency)
npx @vscode/vsce package
code --install-extension lucisv-0.5.0.vsix
```
## Start using it
Then reload VS Code and open a `.v`/`.sv`/`.vh`/`.svh` file.
Most features work as soon as a supported file opens:
`tools/release.sh` from the repo root does all of the above (plus the release
binaries and checksums) and drops the `.vsix` in `dist/`, so
`code --install-extension dist/lucisv-0.5.0.vsix` is the one-command path.
`editors/vscode/LICENSE` is a copy of the repo's MIT license and is what lets
`vsce package` run without `--skip-license`. If you are packaging a fork that
dropped `package.json`'s `repository` field, add `--allow-missing-repository`.
- Hover a symbol, press `F12`, find references, search workspace symbols, or
open the call/type hierarchy using VS Code's standard commands.
- Type a module name at module-item scope to insert a complete instance. Inside
its port list, signature help and inlay hints keep ordered connections clear.
- Use the lightbulb for safe lint fixes and port refactors. Rename is
workspace-aware and verifies its target before opening the rename box.
- Type `if (`, `case (`, `begin`, `fork`, `generate`, or `module` at the end of
a line to get structural ghost text. Press `Tab` to accept it; use `Alt+]` to
cycle when several shapes fit.
- Run **Format Document** or **Format Selection** through the standard VS Code
commands.
**Running from source instead**, for development: open this directory in VS
Code and press F5. That starts an Extension Development Host with the extension
loaded from disk, with no packaging step.
**Sideloading is the supported install.** Marketplace publishing is optional
and deferred: `publisher` is `guoliangchen` (unregistered on any marketplace), so
`vsce publish` would fail, while packaging a `.vsix` and installing it locally
works exactly as above. `tools/RELEASING.md` records what publishing would take
if it ever happens.
## Settings
| Setting | Default | What it does |
|---|---|---|
| `lucisv.serverPath` | `"lucisv-server"` | Path to the executable. A bare name is looked up on `PATH`; an absolute path is used as given. |
| `lucisv.rainbowBeginEnd` | `true` | Colour each nesting level of `begin`/`end` and `fork`/`join` differently, and half a pair in an error colour. Takes effect immediately — no reload. |
| `lucisv.lineLength` | unset | Maximum line width, same as `line-length` in a `lucisv.toml`. 40–400. |
| `lucisv.indent` | unset | Indent width in spaces, same as `indent` in a `lucisv.toml`. 1–8. |
| `lucisv.exclude` | `[]` | Extra patterns to keep out of the workspace index, same as `exclude` in a `lucisv.toml`. **Added to** the project's excludes, never replacing them. |
| `lucisv.filelist` | `""` | Path to an EDA filelist (`.f`), absolute or relative to the workspace folder. When set, exactly the files it names are indexed. Overrides a `filelist` key in the project's `lucisv.toml`. |
The last four mirror the four keys `lucisv.toml` supports, for people with no
config file in the tree. **A `lucisv.toml` always wins over them** — except
`lucisv.filelist`, which is a scope, not a style, and is explained below. So a project
that checks one in keeps one source of truth and format-on-save cannot drift
from CI's `lucisv --check`. Full precedence, highest first:
1. `lucisv.toml`, discovered per file exactly as the CLI discovers it.
2. `lucisv.lineLength` / `lucisv.indent` — typed on purpose, but one user's editor.
3. VS Code's tab size — sent on every request whether or not you chose it, so
the weakest thing that is still a signal. (`lucisv.lineLength` has no analog
here at all: LSP carries no line-length option.)
4. The built-in defaults: indent 2, width 100.
Each rung applies only where the ones above it say nothing, so a `lucisv.toml`
naming only `indent` still lets `lucisv.lineLength` choose the width. Changes
take effect on the next format — no reload — and out-of-range or wrong-typed
values are ignored rather than half-honoured.
## Which files are indexed
Navigation, hover and workspace symbols answer from an index of the project's
files. What goes into it, highest first:
1. **A filelist**, if there is one — `lucisv.filelist`, else a `filelist` key in
the project's `lucisv.toml`. Exactly the files it names are indexed, so a
vendored copy your build does not compile stops showing up in
go-to-definition. Standard `.f` syntax: one path per line, `-f other.f` to
nest, `+incdir+`/`+define+` (recorded, unused for now), `#` and `//`
comments, `$VAR`/`${VAR}` expansion, paths relative to the filelist itself.
2. **The workspace folder**, walked as `lucisv` itself walks it — same
extensions, same `.gitignore`, same excludes.
3. **The open file's own directory**, when no folder is open at all.
Open buffers are always indexed on top of that, so a scratch file the project
does not list still works. A filelist that names a file which has moved warns
and skips it; a filelist that cannot be read at all warns and falls back to
walking the folder — the index is never silently empty.
## Syntax highlighting
Two highlighters, and they are not rivals:
- **Semantic tokens, from the server.** What actually colours your buffer while
the server is running — it knows a name is a port, a parameter or a macro,
which no regex can. Fourteen token types; nothing to configure.
- **A TextMate grammar, from this extension** (`syntaxes/`). Keywords,
comments, strings, numbers (`8'hFF`, `4'b10xz`, `'0`, `1.5e-3`, `10ns`),
`$system_tasks`, `` `directives `` and macro uses. Semantic tokens win
wherever they have something to say, so in a live buffer this mostly fills in
the gaps — but it is the only highlighter in three places that matter:
**hover cards and completion documentation** (the server sends those as
```` ```systemverilog ```` markdown, and markdown is coloured by grammar, not
by semantic tokens), a file before the server has started, and previews VS
Code renders without a language server at all, such as a diff or a git blame.
One grammar file serves both `verilog` and `systemverilog`, because lucisv's
lexer draws no line between the two. Its keyword list is generated from that
lexer's own list and a test in the repository fails if they drift apart. It
covers no operators and no `(* attributes *)` — see
`docs/features/editor-packaging/README.md` for why.
## Rainbow begin/end
Each nesting level of `begin`/`end` and `fork`/`join` is coloured differently,
and a keyword whose counterpart is missing — a `begin` you have just typed, an
`end` that closes nothing — is painted in a bright error red until you finish
the pair. The pairs are matched by the server over the token stream, not by a
regex, so an `end` inside a comment or a string is never coloured and the `end`
that lights up is genuinely the one that closes that `begin`.
The seven colours are the extension's own, so they are always visible whatever
theme you use, and you can change any of them in
`workbench.colorCustomizations`:
To format whenever VS Code saves a file:
```jsonc
"workbench.colorCustomizations": {
"lucisv.rainbow1": "#FFD700", // and rainbow2 … rainbow6
"lucisv.rainbowUnmatched": "#FF1212" // the half-pair colour
}
```
(They are deliberately *not* `editorBracketHighlight.foreground1`…`6`: VS Code
defaults the last three of those to transparent, so borrowing them made deeply
nested `begin`s invisible in most themes.)
Turn it off with `"lucisv.rainbowBeginEnd": false`; the colours disappear
immediately. Cursor on a `begin` also highlights its matching `end` — that is
`documentHighlight`, always on, and it needs no setting.
## Snippets
Type a prefix and pick the snippet from the completion list; `Tab` walks the
placeholders. These are the **file-level** templates, a static manifest
contribution, so they work with no server on `PATH` and before the extension
has activated. Bodies are dialect-specific — `module` gives `input wire` in a
`.v` file and `input logic` in a `.sv` one.
The everyday statement and block templates — `if`, `if/else`, `else if`,
`case`, `for`, `while`, `always_ff`, `always_comb`, `always @(...)`, `initial`
and the `logic`/`reg`/`wire`/`parameter` declarations — come from the **server**
instead, since 0.4.0: they are offered only where the construct may actually be
written, and they were removed from the lists below so no prefix offers the
same thing twice. See
`docs/features/completion-templates/README.md` in the repository.
| Verilog (`.v`, `.vh`) | |
|---|---|
| `module` | module with a port list |
| `function` / `task` | Verilog-2001 declaration with an ANSI argument list |
| `genfor` | `generate`+`genvar` loop with a named block |
| `tb` | testbench module: clock, reset, `$display`, `$finish` |
| `guard` | `` `ifndef ``/`` `define `` include guard from the file name |
| SystemVerilog (`.sv`, `.svh`) | |
|---|---|
| `module` / `modulep` | module with ports / with a parameter list too |
| `uniquecase` | `unique case` with a `default` arm |
| `fsm` | two-process state machine: enum, next-state logic, state register |
| `enum` / `struct` | `typedef enum` / `typedef struct packed` |
| `function` / `task` | `automatic` declaration |
| `interface` | interface with two modports |
| `package` / `class` | package named after the file / class with a constructor |
| `assertp` | labelled concurrent assertion with `disable iff` and `$error` |
| `genfor` | `for (genvar …)` with a named block |
| `tb` | testbench module: clock, reset, `$finish` |
| `guard` | `` `ifndef ``/`` `define `` include guard from the file name |
To add your own without editing the extension, use VS Code's
**Snippets: Configure Snippets** command and pick `verilog` or
`systemverilog`; user snippets sit alongside these, they do not replace them.
## Format on save
The extension registers no formatter of its own — the server advertises
`documentFormattingProvider`, so VS Code's normal machinery applies:
```jsonc
// .vscode/settings.json
{
"[verilog]": { "editor.formatOnSave": true },
"[systemverilog]": { "editor.formatOnSave": true }
}
```
Leave `lucisv.formatOnSave` off in VS Code. That setting is the language
server's protocol-level fallback for editors without native format-on-save;
enabling both paths formats twice.
## Everything included
### Formatting and editing
| Feature | What you get |
|---|---|
| Document formatting | Width-aware, deterministic formatting with inferred alignment for ports, connections, and parameter tables |
| Range and multi-range formatting | Formats selected constructs while leaving the rest of the file byte-for-byte unchanged |
| On-type formatting | Reindents after a newline and formats a completed statement after `;` when `editor.formatOnType` is enabled |
| Format on save | Works through VS Code's native format-on-save flow; a separate LSP save hook is available for other editors |
| Safe output | Token equivalence, comment preservation, convergence checks, and all-or-nothing fallback protect source code |
| Format fences | `// verilog_format: off` / `on` preserves deliberately hand-formatted regions |
| Inline templates | Context-sensitive ghost text completes blocks, cases, processes, generate regions, and modules |
| Smart completion | Context-aware statement/declaration templates plus complete module-instantiation snippets from the workspace index |
| Static snippets | Dialect-specific file-level templates for modules, interfaces, packages, classes, functions, tasks, FSMs, assertions, testbenches, guards, and generate loops |
| Signature help | Names active ports or parameters in named and ordered instantiations |
| Linked editing | Keeps opening and closing labels synchronized for modules, classes, functions, tasks, blocks, forks, and other named scopes |
| Expand selection | Grows from token → statement → scope → item → file along syntax boundaries |
### Diagnostics and fixes
| Feature | What you get |
|---|---|
| Live parse diagnostics | Error-tolerant parsing keeps useful feedback flowing while code is half typed |
| Live lint diagnostics | The same lint registry as `lucisv check`, delivered through push or modern pull diagnostics |
| Safe quick fixes | One lightbulb action per safe lint fix, plus **Fix all lucisv auto-fixable problems** |
| Waivers | `lucisv:` and Verible-compatible `verilog_lint:` line/range waivers are understood |
| Scope feedback | An unmatched `begin`/`end` or `fork`/`join` is colored as an error until its pair exists |
| Workspace diagnostics | Pull-capable clients can request diagnostics across open workspace buffers |
### Navigation and code understanding
| Feature | What you get |
|---|---|
| Hover | Declaration kind and source snippet, macro bodies, and one-step macro argument expansion |
| Go to definition | Local and cross-file symbols, macros, modules, packages, exported members, ports, and resolved `` `include`` targets |
| Go to type definition | Values, handles, instances, interfaces, and aliases navigate to the declared type |
| Find references | Local symbols stay local; indexed design units, package members, and ports resolve across files |
| Document highlights | Highlights symbol occurrences or the matching opener/closer under the cursor |
| Document and workspace symbols | Hierarchical outline plus indexed symbol search across the design |
| Include links | Resolvable `` `include`` paths become clickable using local and filelist `+incdir+` search rules |
| Folding | Modules, classes, blocks, regions, and multiline comments fold on syntax-aware boundaries |
| Inlay hints | Adds port and parameter names to ordered instantiations without guessing at ambiguous sites |
| Code lenses | Shows the workspace-wide instantiation count above every module/interface; click to jump to a site |
| Call hierarchy | Incoming calls answer “who instantiates this?”; outgoing calls answer “what does this instantiate?” |
| Type hierarchy | Walks class `extends` relationships to supertypes and workspace subtypes |
### Highlighting and presentation
| Feature | What you get |
|---|---|
| Semantic highlighting | Classifies declarations and uses by role; viewport and delta responses keep large files responsive |
| TextMate highlighting | Covers keywords, comments, strings, literals, system tasks, directives, and macros before the server starts and inside previews/hover cards |
| Rainbow scopes | Six theme-aware colors distinguish nested `begin`/`end` and `fork`/`join` pairs; unmatched scopes use a seventh error color |
| Matching scopes | Putting the cursor on an opener highlights the exact matching closer |
### Refactoring
| Feature | What you get |
|---|---|
| Rename | Verified local or cross-file symbol renames using the same resolution as navigation |
| Add port | Adds a port to a module/interface and updates affected instantiations |
| Remove port | Removes a declaration and matching connections across the workspace |
| Propagate ports | Carries a port through module boundaries with one multi-file edit |
| File/folder rename support | Rewrites every resolved `` `include`` affected by a move and warns instead of guessing when no safe spelling exists |
| Undo-friendly edits | Workspace refactors are delivered as labelled edits so the editor can apply or reject them as one operation |
### Workspace intelligence
| Feature | What you get |
|---|---|
| Project indexing | Indexes a configured EDA filelist, otherwise the workspace folder, otherwise the open file's directory |
| Filelist support | Nested `-f`, `+incdir+`, `+define+`, comments, environment variables, and relative paths are understood |
| Matching file discovery | Workspace walks honor `.gitignore`, supported file extensions, and `lucisv.toml`/editor excludes |
| Open-buffer overlay | Unsaved files and edits immediately override disk content in navigation and analysis |
| Incremental sync | Keystrokes send only changed ranges, not the full buffer |
| File and folder watching | Create, change, rename, delete, and multi-root folder updates automatically refresh the index |
| Index progress | Large rescans show an **Indexing Verilog workspace** progress bar and final file count |
| Responsive requests | Cancellation drops stale queued work; semantic token deltas and range responses minimize repeated data |
| Live configuration | Project and editor configuration changes take effect without restarting the server |
![lucisv extension architecture](https://git.luci.ooo/lucio/lucisv/raw/branch/master/editors/vscode/images/architecture.png)
## Snippet library
Type a prefix and choose the snippet; `Tab` walks its placeholders. Static
snippets work before the language server starts, while statement/block
templates come from the server so they only appear where the construct is
valid.
| Verilog prefixes | Template |
|---|---|
| `module` | Module with ANSI ports |
| `function`, `task` | Verilog-2001 declarations |
| `genfor` | Generate loop with `genvar` and a named block |
| `tb` | Testbench with clock, reset, display, and finish |
| `guard` | Include guard derived from the file name |
| SystemVerilog prefixes | Template |
|---|---|
| `module`, `modulep` | Module, optionally with parameters |
| `uniquecase` | `unique case` with a default arm |
| `fsm` | Two-process enum-based state machine |
| `enum`, `struct` | Packed type declarations |
| `function`, `task` | Automatic declarations |
| `interface` | Interface with two modports |
| `package`, `class` | File-named package or class with constructor |
| `assertp` | Labelled concurrent assertion |
| `genfor`, `tb`, `guard` | Generate loop, testbench, or include guard |
Server-side templates add `if`, `if/else`, `else if`, `case`, `for`, `while`,
`always_ff`, `always_comb`, `always @(...)`, `initial`, and common
`logic`/`reg`/`wire`/`parameter` declarations at valid cursor positions.
## Settings
| Setting | Default | Purpose |
|---|---:|---|
| `lucisv.rainbowBeginEnd` | `true` | Color nested block pairs and unmatched keywords; updates immediately |
| `lucisv.inlineTemplates` | `true` | Show context-aware structural ghost text; requires `editor.inlineSuggest.enabled` |
| `lucisv.lineLength` | unset | Maximum formatter width, 40–400; built-in default is 100 |
| `lucisv.indent` | unset | Indent width, 1–8; falls back to the editor tab size, then 2 |
| `lucisv.exclude` | `[]` | Extra index exclusions added to the project's own patterns |
| `lucisv.filelist` | `""` | EDA `.f` filelist to index instead of walking the folder |
| `lucisv.formatOnSave` | `false` | Protocol save hook for editors without native format-on-save; keep off in VS Code |
| `lucisv.serverPath` | bundled | Explicit server override for advanced use; an unchanged setting uses the bundled server |
A nearby `lucisv.toml` is the project source of truth and wins over editor
style settings. Each file discovers configuration upward, so one workspace may
contain projects with different formatting rules.
```toml
# lucisv.toml — every key is optional
line-length = 100
indent = 2
exclude = ["generated", "*_gen.sv"]
filelist = "rtl/files.f"
```
The configuration ladder is:
1. The nearest `lucisv.toml` / `.lucisv.toml` discovered for the file.
2. `lucisv.lineLength` and `lucisv.indent` editor settings.
3. VS Code's tab size, for indentation only.
4. Built-in defaults: 100 columns and 2 spaces.
`lucisv.filelist` is an explicit editor override for index scope. Open buffers
are always layered over the chosen scope, even when a scratch file is not in
the filelist.
## Customize rainbow colors
Every nesting color is a proper VS Code theme color:
```jsonc
"workbench.colorCustomizations": {
"lucisv.rainbow1": "#FFD700",
"lucisv.rainbow2": "#DA70D6",
"lucisv.rainbow3": "#179FFF",
"lucisv.rainbow4": "#87D96B",
"lucisv.rainbow5": "#FF8C69",
"lucisv.rainbow6": "#4FD6D6",
"lucisv.rainbowUnmatched": "#FF1212"
}
```
## Release 0.10.2 highlights
Version 0.10.2 is the one-step installation release:
- Five native platform packages embed both the language server and CLI, and an
`all` package carries every platform's pair in one file.
- Linux x64 and Arm64 packages are statically linked and work across distros.
- Explicit `lucisv.serverPath` overrides still work, while clearing the value
returns to the bundled server.
- Release assets are focused on the installable `.vsix` packages and their
checksums.
See the full [release notes](https://git.luci.ooo/lucio/lucisv/releases/tag/v0.10.2)
or the [design documentation](https://git.luci.ooo/lucio/lucisv/src/branch/master/docs/features).
## Troubleshooting
- **Nothing happens on a `.sv` file.** Check the language mode in the status
bar. Another Verilog extension may own the `.sv` extension with a different
language id; this one attaches to `verilog` and `systemverilog`.
- **"command not found" style failure on startup.** The server is not on
`PATH`. Set `lucisv.serverPath` to an absolute path, and confirm the binary
itself works with `node smoke.js <path>`.
- **See what the server is saying.** View → Output → the `lucisv` channel carries
the client/server log, including anything the server writes to stderr.
- **A `.sv` file has no lucisv features:** check the language mode in VS Code's
status bar. Another Verilog extension may have claimed the extension under a
different language id; lucisv activates for `verilog` and `systemverilog`.
- **Inline templates do not appear:** make sure both
`lucisv.inlineTemplates` and `editor.inlineSuggest.enabled` are on.
- **The wrong server starts:** clear a previously set `lucisv.serverPath`.
Any explicit value intentionally wins over the bundled server.
- **Every hover and diagnostic appears twice:** the pre-rename **vfmt**
extension is still installed alongside lucisv and both attach a language
server to the same files. Uninstall `vfmt` (lucisv is its successor) and
reload the window.
- **Navigation finds the wrong project copy:** point `lucisv.filelist` or the
`filelist` key in `lucisv.toml` at the exact EDA filelist your build uses.
- **Need server logs:** open **View → Output** and choose **lucisv**.
lucisv is MIT licensed. Source, issues, and design documentation live in the
[project repository](https://git.luci.ooo/lucio/lucisv).
+92 -1
View File
@@ -8,6 +8,8 @@
// LSP has no "decorate these ranges" notification, so the painting has to be
// driven from the client side (docs/features/editor-scopes).
const fs = require('fs');
const path = require('path');
const vscode = require('vscode');
const { LanguageClient, ProposedFeatures, TransportKind } = require('vscode-languageclient/node');
@@ -44,9 +46,98 @@ let rainbowEnabled = true;
/** The pending debounced repaint, if any. */
let repaintTimer;
/**
* The `lucisv.serverPath` scopes a *user* can write to, most specific first —
* the order VS Code's own `get()` resolves them in.
*
* `defaultValue` and `defaultLanguageValue` are deliberately absent: those are
* defaults contributed by a manifest, not something anybody chose, and treating
* them as a choice is exactly the bug this list exists to avoid (see
* `userServerPath`).
*/
const SERVER_PATH_SCOPES = [
'workspaceFolderLanguageValue',
'workspaceLanguageValue',
'globalLanguageValue',
'workspaceFolderValue',
'workspaceValue',
'globalValue',
];
/**
* The `lucisv.serverPath` the user set, or `undefined` if they never set one.
*
* `inspect()` and not `get()`, and this is the whole reason the function
* exists: `get()` answers `"lucisv-server"` for someone who has never touched
* the setting, because that is `package.json`'s own default — so a `get()`
* check would make the bundled server unreachable for every user who did not
* explicitly override it. A blank value counts as unset, as it always has.
*/
function userServerPath() {
const inspected = vscode.workspace.getConfiguration('lucisv').inspect('serverPath');
if (!inspected) return undefined;
for (const scope of SERVER_PATH_SCOPES) {
const value = inspected[scope];
if (typeof value === 'string' && value.trim() !== '') return value;
}
return undefined;
}
/**
* The path to a binary this package carries under `bin/`, or `undefined` if it
* carries none.
*
* Two layouts are looked at, most specific first
* (docs/features/editor-platform-vsix):
*
* 1. `bin/<name>` — a **platform package**, stamped with vsce's `--target`, so
* its `bin/` is flat and holds exactly one platform's binaries.
* 2. `bin/<platform>-<arch>/<name>` — the **all-platforms package**, which
* carries every platform's pair at once and picks between them here, at
* runtime. The directory names are literally `${process.platform}-${process.arch}`.
*
* The universal package has no `bin/` at all, so both lookups miss and the
* caller falls back to `PATH`. So does a platform we ship no binaries for —
* `win32-arm64`, say: it finds nothing in either layout, and the all-platforms
* package behaves for it exactly like the universal one.
*
* On anything but Windows the executable bit is restored first: VSIX extraction
* does not reliably preserve it — the same chmod, for the same reason, that
* rust-analyzer's extension does — and a server that cannot be spawned looks
* to the user exactly like a server that crashed.
*/
function bundledBinary(context, name) {
const file = process.platform === 'win32' ? `${name}.exe` : name;
const found = [
context.asAbsolutePath(path.join('bin', file)),
context.asAbsolutePath(path.join('bin', `${process.platform}-${process.arch}`, file)),
].find((candidate) => fs.existsSync(candidate));
if (!found) return undefined;
if (process.platform !== 'win32') {
try {
fs.chmodSync(found, 0o755);
} catch {
// A read-only install, or a file owned by someone else. Spawning may
// still work; if it does not, the language client says so in its own
// output channel, which is where the user is already looking.
}
}
return found;
}
/** Spawn the server and attach it to Verilog/SystemVerilog documents. */
function activate(context) {
const serverPath = vscode.workspace.getConfiguration('lucisv').get('serverPath') || 'lucisv-server';
// Nothing here spawns the bundled CLI, but the platform packages ship it so
// that installing the extension gives you `lucisv` too — which is only true
// if it is executable.
bundledBinary(context, 'lucisv');
// Resolved unconditionally, so both bundled binaries are made executable
// even when a user setting wins the spawn below.
const bundledServer = bundledBinary(context, 'lucisv-server');
// A setting the user wrote, else the binary in this package, else the bare
// name on PATH — which is what the universal package and a `cargo build`
// install have always used.
const serverPath = userServerPath() || bundledServer || 'lucisv-server';
// No arguments: `lucisv-server` takes none and speaks LSP on stdin/stdout.
// `editors/vscode/smoke.js` spawns it exactly this way.
Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "lucisv",
"version": "0.7.2",
"version": "0.10.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "lucisv",
"version": "0.7.2",
"version": "0.10.2",
"license": "MIT",
"dependencies": {
"vscode-languageclient": "9.0.1"
+34 -5
View File
@@ -1,22 +1,51 @@
{
"name": "lucisv",
"displayName": "lucisv — Verilog/SystemVerilog",
"description": "Formatting, diagnostics, navigation and semantic highlighting for Verilog and SystemVerilog, served by the lucisv language server.",
"version": "0.10.0",
"description": "Fast Verilog/SystemVerilog formatting, linting, navigation, refactoring, semantic highlighting and RTL design intelligence.",
"version": "0.10.2",
"publisher": "guoliangchen",
"author": "Guoliang Chen",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://git.luci.ooo/lucio/verilogrustformatter"
"url": "https://git.luci.ooo/lucio/lucisv"
},
"homepage": "https://git.luci.ooo/lucio/lucisv",
"bugs": {
"url": "https://git.luci.ooo/lucio/lucisv/issues"
},
"icon": "images/icon.png",
"galleryBanner": {
"color": "#07111F",
"theme": "dark"
},
"pricing": "Free",
"keywords": [
"verilog",
"systemverilog",
"sv",
"rtl",
"hdl",
"asic",
"fpga",
"eda",
"formatter",
"linter",
"language server",
"lsp",
"semantic highlighting",
"refactoring",
"code navigation",
"snippets"
],
"engines": {
"vscode": "^1.82.0"
},
"categories": [
"Programming Languages",
"Formatters",
"Linters"
"Linters",
"Snippets"
],
"main": "./extension.js",
"activationEvents": [
@@ -156,7 +185,7 @@
"lucisv.serverPath": {
"type": "string",
"default": "lucisv-server",
"description": "Path to the lucisv-server executable. A bare name is looked up on PATH."
"description": "Path to the lucisv-server executable. Overrides the server bundled with the extension. A bare name is looked up on PATH."
},
"lucisv.rainbowBeginEnd": {
"type": "boolean",
+86 -21
View File
@@ -9,8 +9,9 @@ it lives in the appendix at the bottom.
## Cross-platform builds (`--cross`)
`tools/release.sh --cross` adds, next to the host (Apple Silicon) pair:
`x86_64-apple-darwin` (Intel Mac), `x86_64-unknown-linux-musl` (any x86-64
Linux — statically linked, no glibc dependency) and `x86_64-pc-windows-gnu`
`x86_64-apple-darwin` (Intel Mac), `x86_64-unknown-linux-musl` and
`aarch64-unknown-linux-musl` (any x86-64 / ARM64 Linux — statically linked,
no glibc dependency) and `x86_64-pc-windows-gnu`
(`.exe`, depends only on DLLs Windows 10+ ships) and
`x86_64-unknown-linux-gnu` — the glibc-linked build for enterprise
distributions: the messense toolchain's sysroot keeps the highest
@@ -19,8 +20,29 @@ runs on RHEL 8.x (verified for 8.10 by symbol audit:
`x86_64-unknown-linux-gnu-objdump -T dist/lucisv-server-* | grep -o
'GLIBC_[0-9.]*' | sort -Vu | tail -1`; every NEEDED library is in a base
install). The static musl build runs there too — the gnu build exists
for shops that require a native glibc link. The `.vsix` is
platform-independent JavaScript; only the binaries are per-platform.
for shops that require a native glibc link.
`--cross` also turns each cross-built pair into a **platform-specific `.vsix`**
that carries those two binaries inside it, so installing the extension needs no
separate binary install (`docs/features/editor-platform-vsix/README.md`). The
platform-independent `.vsix` — the same JavaScript, no binaries, server looked
up on `PATH` — is still built as the universal fallback, and one more package,
`lucisv-<version>-all.vsix`, carries **all five pairs at once**.
| package | rust triple |
|---|---|
| `darwin-arm64` | `aarch64-apple-darwin` (host; built without `--cross` too) |
| `darwin-x64` | `x86_64-apple-darwin` |
| `linux-x64` | `x86_64-unknown-linux-musl` |
| `linux-arm64` | `aarch64-unknown-linux-musl` |
| `win32-x64` | `x86_64-pc-windows-gnu` |
| `all` | all five of the above, under `bin/<platform>-<arch>/` |
`x86_64-unknown-linux-gnu` deliberately gets no package: `linux-x64` ships the
static musl build, which runs on any distro. Alpine's own `alpine-x64` /
`alpine-arm64` targets are not built either, so VS Code on Alpine is never
offered a targeted package — the `all` package covers it instead, since it
carries no `--target` and Alpine's `process.platform` is plain `linux`.
One-time setup on the build Mac (2026-08-25, all via Homebrew):
@@ -31,6 +53,10 @@ brew install messense/macos-cross-toolchains/x86_64-unknown-linux-gnu
/opt/homebrew/opt/rustup/bin/rustup target add --toolchain stable \
x86_64-apple-darwin x86_64-unknown-linux-musl x86_64-unknown-linux-gnu \
x86_64-pc-windows-gnu
# added 2026-08-27, for the linux-arm64 extension package (rust-lld links it;
# no C toolchain needed):
/opt/homebrew/opt/rustup/bin/rustup target add --toolchain stable \
aarch64-unknown-linux-musl
```
Notes the script encodes so nobody rediscovers them: the Homebrew *rust*
@@ -95,18 +121,26 @@ tools/release.sh # or: tools/release.sh -o /some/other/dir
It builds `--release`, copies the two binaries into `dist/` under
version-and-host names, smoke-tests the server binary with
`editors/vscode/smoke.js`, packages the extension into `dist/lucisv-<version>.vsix`,
and writes `dist/SHA256SUMS`. `dist/` is gitignored and is deleted and
recreated on every run.
`editors/vscode/smoke.js`, packages the extension into `dist/lucisv-<version>.vsix`
and into the host's platform package, smoke-tests the server *unzipped out of*
that package, and writes `dist/SHA256SUMS`. `dist/` is gitignored and is
deleted and recreated on every run.
```
dist/
lucisv-0.7.0-aarch64-apple-darwin
lucisv-server-0.7.0-aarch64-apple-darwin
lucisv-0.7.0.vsix
lucisv-0.7.0.vsix # universal: no binaries, server from PATH
lucisv-0.7.0-darwin-arm64.vsix # the same extension with the pair inside
SHA256SUMS
```
With `--cross` the loose binaries appear for all six triples, the remaining four
platform packages (`darwin-x64`, `linux-x64`, `linux-arm64`, `win32-x64`) join
them, and so does the all-platforms `lucisv-<version>-all.vsix` — twelve
binaries and **seven** `.vsix` files, plus `SHA256SUMS`. The `all` package needs
all five pairs to exist, so it is the one artifact a plain run cannot produce.
Verify the checksums the way a downloader would:
```bash
@@ -127,6 +161,9 @@ The script runs, inside `editors/vscode/`:
```bash
npm ci # 8 packages, exact lockfile
npx @vscode/vsce package --out ../../dist/lucisv-<version>.vsix
# then, per platform, with the two binaries staged in editors/vscode/bin/:
npx @vscode/vsce package --target darwin-arm64 \
--out ../../dist/lucisv-<version>-darwin-arm64.vsix
```
- **No `--skip-license`.** `vsce` requires a `LICENSE` file next to
@@ -144,10 +181,21 @@ npx @vscode/vsce package --out ../../dist/lucisv-<version>.vsix
is to package from a plain path, which is why `release.sh` packages inside the
repo and only writes its *output* to `-o`.
- `.vscodeignore` keeps `smoke.js`, `.vscode/**` and `.gitignore` out of the
package. Check that after any change to it:
package. It must **not** exclude `bin/`, which is where the platform packages'
binaries are staged. Check that after any change to it:
`unzip -l dist/lucisv-<version>.vsix | grep smoke` must print nothing, and
`unzip -l dist/lucisv-<version>.vsix | grep syntaxes` must print the grammar —
without it, hover cards ship unhighlighted.
- **`editors/vscode/bin/` is transient.** `release.sh` stages one platform's
pair into it (or, for the `all` package, all five pairs into
`bin/<platform>-<arch>/` subdirectories), packages, and removes it again, with
an `EXIT` trap so a failed run cannot leave binaries in the working tree; it is
gitignored as a second line of defence. Every package is then asserted with
`unzip -Z1 <vsix> 'extension/bin/*'`: nothing for the universal one, exactly
`lucisv` and `lucisv-server` (`.exe` for `win32-x64`) for a platform one, and
exactly ten entries under five subdirectories for the `all` one — Info-ZIP's
`*` matches `/`, so one pattern covers both layouts. A stale `bin/` would
otherwise ship one platform's server to another's users.
## 5. Install / distribute
@@ -157,12 +205,23 @@ install -m 755 dist/lucisv-0.7.0-aarch64-apple-darwin ~/.local/bin/lucisv
install -m 755 dist/lucisv-server-0.7.0-aarch64-apple-darwin ~/.local/bin/lucisv-server
# the editor extension: sideload, no marketplace involved
code --install-extension dist/lucisv-0.7.0.vsix
code --install-extension dist/lucisv-0.7.0-darwin-arm64.vsix # binaries inside
code --install-extension dist/lucisv-0.7.0.vsix # or: server from PATH
```
Publishing the artifacts is a matter of attaching `dist/`'s contents plus
`SHA256SUMS` to a git tag / release page on `git.luci.ooo`. Tag after the
gate is green:
The platform package is the one to hand a user: it carries `lucisv` and
`lucisv-server` for that machine, so the two `install -m 755` lines above become
optional. Pick the package by machine — `darwin-arm64`, `darwin-x64`,
`linux-x64`, `linux-arm64`, `win32-x64`. When the machine is *not* known in
advance — a mixed fleet, an offline mirror, Alpine — hand over
`lucisv-<version>-all.vsix` instead: same binaries, all five platforms in the
one file, at ~13 MB rather than ~3 MB. The universal `lucisv-<version>.vsix`
remains the no-binaries fallback.
Publishing means attaching the seven `.vsix` packages plus `SHA256SUMS` to a
git tag / release page on `git.luci.ooo` — the CI release does exactly that
and nothing more (the loose binaries stay unpublished; see "CI releases"
below). Tag after the gate is green:
```bash
git tag -a v0.5.0 -m 'lucisv 0.5.0'
@@ -179,9 +238,9 @@ the information is not lost, not as a checklist step.
What would have to change first:
- `editors/vscode/package.json`'s `publisher` is the literal string
`guoliangchen` (author: Guoliang Chen). Marketplace publishing would still need
that id registered with vsce by the owner
has created in the Visual Studio Marketplace.
`guoliangchen` (author: Guoliang Chen). Marketplace publishing would still
need the owner to register that id in the Visual Studio Marketplace and log
in to it with `vsce login`.
- An **icon** (128×128 PNG, `"icon"` in `package.json`) and optionally a
`galleryBanner`. Deliberately not added: binary brand assets are the owner's
to choose, and a marketplace listing without them looks unfinished anyway.
@@ -216,11 +275,17 @@ git push origin v<X.Y.Z>
```
does the rest on the `mac-arm64` runner: `tools/release.sh --cross`, a
tag-vs-`lucisv --version` consistency check, `tools/release_notes.sh` (a
missing CHANGELOG section fails the release), and
`tools/publish_release.sh`, which creates the Gitea release and attaches
every `dist/` artifact. Ordinary pushes run fmt/clippy/test via
`.gitea/workflows/ci.yml`.
tag-vs-`lucisv --version` consistency check,
`tools/prune_release_assets.sh dist <version>`, which keeps **only the
seven `.vsix` packages** in `dist/` (each checked by name — a missing
package fails the release — and `SHA256SUMS` filtered down to them and
re-verified), `tools/release_notes.sh` (a missing
CHANGELOG section fails the release), and `tools/publish_release.sh`,
which creates the Gitea release and attaches what remains. The loose
binaries are built and audited on the runner — the packages are made
from them — but never published: a standalone binary is a
`cargo build --release` away for whoever wants one. Ordinary pushes run
fmt/clippy/test via `.gitea/workflows/ci.yml`.
The runner is this Mac: `brew install gitea-runner`, registered
instance-wide as `mac-arm64` (labels `macos-arm64`/`self-hosted`, host
+25 -1
View File
@@ -7,11 +7,15 @@
# non-macOS artifacts are never executed; this automates the audit
# tools/RELEASING.md documented as manual, and the release fails if any
# check does:
# *-linux-musl ELF x86-64, statically linked (zero NEEDED entries)
# *-linux-musl ELF (x86-64 / aarch64), statically linked
# *-linux-gnu ELF x86-64, glibc symbol ceiling <= 2.28 (RHEL 8)
# *-windows-gnu.exe PE32+ x86-64
# *-apple-darwin Mach-O 64-bit (arm64 / x86_64 per triple)
#
# The .vsix packages (platform-specific ones included) are skipped here:
# tools/release.sh asserts their contents as it builds them
# (docs/features/editor-platform-vsix).
#
# Needs the messense x86_64-unknown-linux-gnu toolchain's objdump for the
# ELF checks (the same toolchain the linux-gnu build itself needs).
@@ -45,6 +49,26 @@ for f in "$dist"/lucisv-*; do
fail "$name: musl build has dynamic dependencies (must be static)"
fi
;;
*aarch64-unknown-linux-musl)
# Two independent opinions, because the objdump here is a binutils
# configured for x86-64: it does parse aarch64 ELFs (verified on this
# machine -- "file format elf64-little", program headers and all), but
# the dynamic-section read is the one thing that would fail quietly if a
# future binutils stopped doing so. `file` reporting "statically linked"
# is the honest cross-check, and it also names the architecture, which
# objdump's generic elf64-little does not.
case $kind in
*ELF*aarch64*) ;;
*) fail "$name: not an aarch64 ELF: $kind" ;;
esac
case $kind in
*"statically linked"*) ;;
*) fail "$name: musl build is not statically linked: $kind" ;;
esac
if "$objdump" -p "$f" | grep -q NEEDED; then
fail "$name: musl build has dynamic dependencies (must be static)"
fi
;;
*x86_64-unknown-linux-gnu)
case $kind in
*ELF*x86-64*) ;;
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env bash
# Reduce a built dist/ directory to the assets a release publishes.
#
# Usage: tools/prune_release_assets.sh <dist-dir> <version>
# tools/prune_release_assets.sh dist 0.10.0
#
# A release page carries the seven .vsix packages and SHA256SUMS, nothing else
# (docs/features/ci-release): the extension is the product, and the loose
# per-triple binaries exist only so the packages can be built and audited from
# them. Every package is checked by name first -- tools/release.sh would have
# failed earlier, but a release quietly missing a platform is exactly the
# failure this step exists to prevent -- then SHA256SUMS is *filtered* down to
# its .vsix lines rather than recomputed, so the hashes published are the ones
# tools/audit_artifacts.sh already gated on, everything else is deleted, and
# what remains is re-verified the way a downloader would.
#
# Exit status: 0 if all seven packages were present and verified.
set -eu
[ $# -eq 2 ] || { echo "usage: $0 <dist-dir> <version>" >&2; exit 2; }
dist=$1
version=$2
[ -d "$dist" ] || { echo "no dist directory at $dist" >&2; exit 2; }
[ -f "$dist/SHA256SUMS" ] || { echo "no SHA256SUMS in $dist" >&2; exit 2; }
cd "$dist"
# The universal fallback, the five platform packages, and the all-platforms one.
# Each is a must: a missing platform package strands that platform's users on
# "install a binary yourself", which is the whole thing these packages fix.
for suffix in "" -darwin-arm64 -darwin-x64 -linux-x64 -linux-arm64 -win32-x64 -all; do
[ -f "lucisv-$version$suffix.vsix" ] || {
echo "missing lucisv-$version$suffix.vsix" >&2
exit 1
}
done
grep '\.vsix$' SHA256SUMS > SHA256SUMS.tmp
mv SHA256SUMS.tmp SHA256SUMS
find . -type f ! -name '*.vsix' ! -name SHA256SUMS -delete
shasum -a 256 -c SHA256SUMS
+180 -10
View File
@@ -5,13 +5,23 @@
# dist/lucisv-<version>-<host-triple>
# dist/lucisv-server-<version>-<host-triple>
# dist/lucisv-<version>.vsix (the VS Code extension; sideload it)
# dist/lucisv-<version>-darwin-arm64.vsix (the same extension, with the
# host binaries inside it -- no PATH
# setup needed; docs/features/editor-platform-vsix)
# dist/SHA256SUMS
#
# Standard tooling only -- cargo, npm and shasum, nothing installed globally.
# With --cross it also builds x86_64 macOS, static-musl Linux and Windows
# binaries, when the toolchains are present (rustup stable + the three
# targets, and mingw-w64 for Windows; see tools/RELEASING.md). It publishes
# nothing anywhere.
# Standard tooling only -- cargo, npm, shasum and unzip (the last only to
# check what the packages ended up containing), nothing installed globally.
# With --cross it also builds x86_64 macOS, static-musl Linux (x86-64 and
# aarch64) and Windows binaries, when the toolchains are present (rustup
# stable + the five targets, and mingw-w64 for Windows; see
# tools/RELEASING.md), plus the four remaining platform-specific .vsix
# packages and
# dist/lucisv-<version>-all.vsix (every platform's pair in one package,
# under bin/<platform>-<arch>/ directories
# extension.js selects from at runtime)
# -- seven packages in all. The all-platforms one needs all five pairs, so it
# exists only on a --cross run. It publishes nothing anywhere.
#
# Usage: tools/release.sh [-o dist-dir] [--no-vsix] [--cross]
#
@@ -38,6 +48,15 @@ case $dist in
*) dist=$repo_root/$dist ;;
esac
# Where a platform package's binaries are staged, one target at a time. It must
# never outlive a packaging step: a leftover bin/ would put the previous
# target's binaries into the next package -- or into the universal one, whose
# whole point is carrying none. The trap covers the failure and Ctrl-C paths;
# every success path removes it explicitly as well.
bin_dir=$repo_root/editors/vscode/bin
trap 'rm -rf "$bin_dir"' EXIT
rm -rf "$bin_dir"
echo "==> building release binaries"
cargo build --release --manifest-path "$repo_root/Cargo.toml" \
-p lucisv -p lucisv_server
@@ -76,6 +95,12 @@ if [ "$want_cross" -eq 1 ]; then
cross_build x86_64-unknown-linux-musl \
DYLD_FALLBACK_LIBRARY_PATH="$tc/lib" \
CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=rust-lld
# Same recipe, other architecture: rust-lld cross-links aarch64 as happily as
# x86-64, so this needs no C toolchain of its own -- only the rust-std
# component (`rustup target add`, see tools/RELEASING.md).
cross_build aarch64-unknown-linux-musl \
DYLD_FALLBACK_LIBRARY_PATH="$tc/lib" \
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=rust-lld
if command -v x86_64-unknown-linux-gnu-gcc >/dev/null 2>&1; then
cross_build x86_64-unknown-linux-gnu \
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-unknown-linux-gnu-gcc
@@ -91,7 +116,7 @@ if [ "$want_cross" -eq 1 ]; then
echo "error: --cross needs mingw-w64 for the Windows build (brew install mingw-w64)" >&2
exit 2
fi
for triple in x86_64-apple-darwin x86_64-unknown-linux-musl x86_64-unknown-linux-gnu x86_64-pc-windows-gnu; do
for triple in x86_64-apple-darwin x86_64-unknown-linux-musl aarch64-unknown-linux-musl x86_64-unknown-linux-gnu x86_64-pc-windows-gnu; do
case $triple in *windows*) exe=.exe ;; *) exe="" ;; esac
cp "$repo_root/target/$triple/release/lucisv$exe" "$dist/lucisv-$version-$triple$exe"
cp "$repo_root/target/$triple/release/lucisv-server$exe" "$dist/lucisv-server-$version-$triple$exe"
@@ -108,6 +133,114 @@ else
echo " note: no node on PATH, skipping the server smoke test" >&2
fi
# vsce names platforms its own way and rustc names triples; this table is the
# whole translation. An unlisted triple gets no platform package -- notably
# x86_64-unknown-linux-gnu, because `linux-x64` ships the *musl* build: a
# statically linked server runs on any distro, which is what an extension
# installed by a stranger needs (docs/features/editor-platform-vsix).
vsce_target_for() { # rust triple -> vsce target name, empty if we ship none
case $1 in
aarch64-apple-darwin) echo darwin-arm64 ;;
x86_64-apple-darwin) echo darwin-x64 ;;
x86_64-unknown-linux-musl) echo linux-x64 ;;
aarch64-unknown-linux-musl) echo linux-arm64 ;;
x86_64-pc-windows-gnu) echo win32-x64 ;;
*) echo "" ;;
esac
}
# What a package carries under bin/ is the contract extension.js resolves
# against, so it is asserted rather than assumed: the universal package must
# carry nothing, a platform package exactly its two binaries, the all-platforms
# package exactly ten under five subdirectories. Info-ZIP's `*` matches `/`
# too (unlike a shell glob), so the one pattern covers the nested layout as
# well -- and vsce writes no directory entries, so nothing but files comes back.
expect_vsix_bins() { # vsix file name, then the extension/bin entries expected
vsix=$1; shift
got=$(unzip -Z1 "$dist/$vsix" 'extension/bin/*' 2>/dev/null | LC_ALL=C sort | tr '\n' ' ')
if [ $# -eq 0 ]; then
want=""
else
want=$(printf '%s\n' "$@" | LC_ALL=C sort | tr '\n' ' ')
fi
if [ "$got" != "$want" ]; then
echo "error: $vsix carries bin/ entries [$got], expected [$want]" >&2
exit 1
fi
echo " $vsix: bin/ contents ok"
}
package_vsix() { # vsce target, rust triple
vsce_target=$1
triple=$2
case $triple in *windows*) exe=.exe ;; *) exe="" ;; esac
echo "==> packaging the VS Code extension for $vsce_target ($triple)"
# Plain names inside the package: extension.js looks for bin/lucisv-server,
# with no version and no triple in it, on every platform.
mkdir -p "$bin_dir"
cp "$dist/lucisv-$version-$triple$exe" "$bin_dir/lucisv$exe"
cp "$dist/lucisv-server-$version-$triple$exe" "$bin_dir/lucisv-server$exe"
chmod +x "$bin_dir/lucisv$exe" "$bin_dir/lucisv-server$exe"
(
cd "$repo_root/editors/vscode"
npx @vscode/vsce package --target "$vsce_target" \
--out "$dist/lucisv-$version-$vsce_target.vsix"
)
rm -rf "$bin_dir"
expect_vsix_bins "lucisv-$version-$vsce_target.vsix" \
"extension/bin/lucisv$exe" "extension/bin/lucisv-server$exe"
vsix_built="$vsix_built lucisv-$version-$vsce_target.vsix"
}
# One package for every platform at once: each pair under bin/<platform>-<arch>/,
# the exact string extension.js builds from `process.platform`/`process.arch` to
# pick its own. Deliberately packaged with no --target, like the universal one,
# so VS Code offers it to any machine -- including the ones vsce calls alpine-x64
# and alpine-arm64, where our static-musl Linux binaries run perfectly but a
# linux-x64-targeted package is never even offered. The price is that every user
# downloads every platform's binaries (docs/features/editor-platform-vsix).
package_all_vsix() { # rust triples, one per platform to carry
echo "==> packaging the VS Code extension for all platforms"
rm -rf "$bin_dir"
all_bins=""
for triple in "$@"; do
vsce_target=$(vsce_target_for "$triple")
[ -n "$vsce_target" ] || continue
case $triple in *windows*) exe=.exe ;; *) exe="" ;; esac
mkdir -p "$bin_dir/$vsce_target"
cp "$dist/lucisv-$version-$triple$exe" "$bin_dir/$vsce_target/lucisv$exe"
cp "$dist/lucisv-server-$version-$triple$exe" "$bin_dir/$vsce_target/lucisv-server$exe"
chmod +x "$bin_dir/$vsce_target/lucisv$exe" "$bin_dir/$vsce_target/lucisv-server$exe"
all_bins="$all_bins extension/bin/$vsce_target/lucisv$exe extension/bin/$vsce_target/lucisv-server$exe"
done
(
cd "$repo_root/editors/vscode"
npx @vscode/vsce package --out "$dist/lucisv-$version-all.vsix"
)
rm -rf "$bin_dir"
# shellcheck disable=SC2086 # deliberate word splitting: one arg per entry
expect_vsix_bins "lucisv-$version-all.vsix" $all_bins
vsix_built="$vsix_built lucisv-$version-all.vsix"
}
# Unzip a package and drive the server it carries through a full LSP session, so
# "install the extension and it works" is proven against a binary that has been
# through the zip rather than against the one in dist/. unzip does not restore
# the executable bit reliably -- the same reason extension.js chmods what it
# spawns.
smoke_embedded_server() { # vsix file name, the bin/ path inside the package
vsix=$1
inner=$2
echo "==> smoke-testing the server embedded in $vsix"
unpacked=$repo_root/target/vsix-check
rm -rf "$unpacked"
unzip -q "$dist/$vsix" -d "$unpacked"
chmod +x "$unpacked/$inner/lucisv" "$unpacked/$inner/lucisv-server"
node "$repo_root/editors/vscode/smoke.js" "$unpacked/$inner/lucisv-server"
rm -rf "$unpacked"
}
vsix_built=""
if [ "$want_vsix" -eq 1 ]; then
echo "==> packaging the VS Code extension"
# `vsce` shells out to `npm list` and globs the paths it prints back, so it
@@ -115,18 +248,55 @@ if [ "$want_vsix" -eq 1 ]; then
# session sandbox rewrites, it silently collects zero files and fails with
# "Extension entrypoint(s) missing". The repo itself is such a plain path,
# which is why this packages in place and only the output goes to -o.
#
# The universal package goes first, with bin/ provably gone: it is the one
# that must never carry a binary, being the fallback for every platform we
# do not build for.
rm -rf "$bin_dir"
(
cd "$repo_root/editors/vscode"
npm ci
npx @vscode/vsce package --out "$dist/lucisv-$version.vsix"
)
expect_vsix_bins "lucisv-$version.vsix"
vsix_built=" lucisv-$version.vsix"
# Without --cross only the host's binaries exist, so only the host package
# can be built -- and it is, so that the packaging path and the embedded
# smoke test below run on every ordinary release too.
vsix_triples=$host
if [ "$want_cross" -eq 1 ]; then
vsix_triples="$host x86_64-apple-darwin x86_64-unknown-linux-musl aarch64-unknown-linux-musl x86_64-pc-windows-gnu"
fi
for triple in $vsix_triples; do
vsce_target=$(vsce_target_for "$triple")
[ -n "$vsce_target" ] || continue
package_vsix "$vsce_target" "$triple"
done
# The all-platforms package carries all five pairs, so it can only be built
# when all five exist -- which is exactly what --cross means here.
if [ "$want_cross" -eq 1 ]; then
# shellcheck disable=SC2086 # deliberate word splitting: one arg per triple
package_all_vsix $vsix_triples
fi
# Two packages get one more check each: unzip and drive the *embedded* server
# through a full LSP session. The host platform package proves the flat bin/
# layout, the all-platforms package proves the bin/<platform>-<arch>/ one --
# the two layouts extension.js resolves against, both tested against a binary
# that has actually been through a zip.
host_vsce_target=$(vsce_target_for "$host")
if [ -n "$host_vsce_target" ] && command -v node >/dev/null 2>&1; then
smoke_embedded_server "lucisv-$version-$host_vsce_target.vsix" extension/bin
if [ "$want_cross" -eq 1 ]; then
smoke_embedded_server "lucisv-$version-all.vsix" "extension/bin/$host_vsce_target"
fi
fi
fi
echo "==> checksums"
artifacts="lucisv-$version-$host lucisv-server-$version-$host$cross_built"
if [ "$want_vsix" -eq 1 ]; then
artifacts="$artifacts lucisv-$version.vsix"
fi
artifacts="lucisv-$version-$host lucisv-server-$version-$host$cross_built$vsix_built"
(
# Relative names, so `shasum -c SHA256SUMS` works from inside dist/.
cd "$dist"