Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d070a4277 | ||
|
|
64d6e9a55d | ||
|
|
cebb333bd7 |
No files matched your search
@@ -1,10 +1,12 @@
|
||||
# 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. What the release page carries is the six .vsix packages —
|
||||
# the universal one plus darwin-arm64/darwin-x64/linux-x64/linux-arm64/
|
||||
# win32-x64 with the lucisv + lucisv-server binaries embedded — and
|
||||
# SHA256SUMS; each platform package is a must, and a missing one fails
|
||||
# the release. The loose binaries are still built for every target
|
||||
# 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).
|
||||
@@ -34,26 +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 six must exist
|
||||
# (release.sh would have failed earlier, but a missing package here is
|
||||
# exactly the failure this release exists to prevent, so it is checked
|
||||
# by name); the loose binaries were needed to build and audit them and
|
||||
# are dropped now. SHA256SUMS is filtered, not recomputed — the
|
||||
# published hashes are the audited ones — and re-verified after.
|
||||
# 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: |
|
||||
v=${GITHUB_REF_NAME#v}
|
||||
cd dist
|
||||
for t in "" -darwin-arm64 -darwin-x64 -linux-x64 -linux-arm64 -win32-x64; do
|
||||
[ -f "lucisv-$v$t.vsix" ] || {
|
||||
echo "missing lucisv-$v$t.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
|
||||
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
|
||||
|
||||
@@ -4,6 +4,46 @@ 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
|
||||
|
||||
Generated
+8
-8
@@ -97,7 +97,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lucisv"
|
||||
version = "0.10.1"
|
||||
version = "0.10.2"
|
||||
dependencies = [
|
||||
"lucisv_core",
|
||||
"rayon",
|
||||
@@ -108,11 +108,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lucisv_core"
|
||||
version = "0.10.1"
|
||||
version = "0.10.2"
|
||||
|
||||
[[package]]
|
||||
name = "lucisv_server"
|
||||
version = "0.10.1"
|
||||
version = "0.10.2"
|
||||
dependencies = [
|
||||
"lsp-server",
|
||||
"lsp-types",
|
||||
@@ -248,14 +248,14 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
||||
|
||||
[[package]]
|
||||
name = "vlog_formatter"
|
||||
version = "0.10.1"
|
||||
version = "0.10.2"
|
||||
dependencies = [
|
||||
"vlog_parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "vlog_linter"
|
||||
version = "0.10.1"
|
||||
version = "0.10.2"
|
||||
dependencies = [
|
||||
"vlog_formatter",
|
||||
"vlog_parser",
|
||||
@@ -264,11 +264,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "vlog_parser"
|
||||
version = "0.10.1"
|
||||
version = "0.10.2"
|
||||
|
||||
[[package]]
|
||||
name = "vlog_refactor"
|
||||
version = "0.10.1"
|
||||
version = "0.10.2"
|
||||
dependencies = [
|
||||
"vlog_parser",
|
||||
"vlog_semantic",
|
||||
@@ -276,7 +276,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "vlog_semantic"
|
||||
version = "0.10.1"
|
||||
version = "0.10.2"
|
||||
dependencies = [
|
||||
"vlog_parser",
|
||||
]
|
||||
+1
-1
@@ -12,7 +12,7 @@ members = [
|
||||
]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.10.1"
|
||||
version = "0.10.2"
|
||||
authors = ["Guoliang Chen"]
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
|
||||
@@ -620,6 +620,10 @@ and sideload it:
|
||||
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:
|
||||
@@ -703,10 +707,12 @@ 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 **six `.vsix` packages** — platform-specific ones for
|
||||
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, plus the
|
||||
universal no-binary fallback — and a `SHA256SUMS` to verify them with
|
||||
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
|
||||
@@ -720,7 +726,7 @@ 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 —
|
||||
|
||||
@@ -6,17 +6,17 @@ 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 x86-64/ARM64 and RHEL 8-compatible Linux,
|
||||
Windows — both binaries each — plus the six `.vsix` packages and
|
||||
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 six `.vsix` packages
|
||||
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, each platform 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
|
||||
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 six packages.
|
||||
versions, written notes, and all seven packages.
|
||||
|
||||
## Assumptions
|
||||
|
||||
@@ -46,10 +46,19 @@ versions, written notes, and all six packages.
|
||||
|
||||
- Consumes `tools/release.sh --cross` unchanged: artifact names
|
||||
(`lucisv[-server]-<version>-<triple>[.exe]`,
|
||||
`lucisv-<version>[-<vsce-target>].vsix`, `SHA256SUMS`) and the
|
||||
version-from-binary convention. The workflow's pruning step depends on
|
||||
those `.vsix` names exactly — it checks all six by name and filters
|
||||
`SHA256SUMS` down to `.vsix` lines before publishing.
|
||||
`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
|
||||
@@ -79,12 +88,17 @@ versions, written notes, and all six packages.
|
||||
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 six packages exist by name, filters `SHA256SUMS`
|
||||
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.
|
||||
|
||||
@@ -127,6 +141,51 @@ versions, written notes, and all six packages.
|
||||
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 |
@@ -35,13 +35,15 @@ binary on `PATH`).
|
||||
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.** `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 the universal package and needs
|
||||
`lucisv-server` on `PATH`, even though the musl binary we ship would have run
|
||||
there perfectly. Building two more 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).
|
||||
- **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
|
||||
@@ -67,16 +69,42 @@ feature changes is *which path* is spawned, never how.
|
||||
naming. The staging step reads those exact names; renaming an artifact breaks
|
||||
packaging loudly (a missing `cp` source), not silently.
|
||||
|
||||
**Promised to `extension.js`** — a platform package always contains **both**
|
||||
binaries under `bin/`, named plainly (`lucisv`, `lucisv-server`, with `.exe` on
|
||||
Windows) with no version or triple in the name; the universal package contains
|
||||
**no** `bin/` directory at all. `release.sh` asserts both with `unzip -Z1`
|
||||
after every package it builds, so "the extension found a stale binary from the
|
||||
previous target" cannot ship.
|
||||
**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 new `.vsix` names all end
|
||||
in `.vsix` and are skipped by the audit's existing case arm.
|
||||
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.
|
||||
|
||||
@@ -93,9 +121,11 @@ first:
|
||||
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**, `<extension>/bin/lucisv-server`(`.exe`), if the file
|
||||
exists. Its existence is the whole runtime test for "am I a platform package
|
||||
or the universal one" — no build-time flag, no manifest field.
|
||||
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.
|
||||
@@ -105,6 +135,54 @@ 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` |
|
||||
@@ -112,12 +190,13 @@ claim false.
|
||||
| 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 six.
|
||||
always carry all seven.
|
||||
|
||||
## Status / TODO
|
||||
|
||||
@@ -137,13 +216,26 @@ always carry all six.
|
||||
- [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`.
|
||||
- [ ] **Not done, and not doable here:** none of the five packages has been
|
||||
- [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 and
|
||||
by the packaging assertions, not by an editor picking the right package
|
||||
off a marketplace. The Linux and Windows packages have additionally never
|
||||
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.
|
||||
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.
|
||||
|
||||
@@ -294,6 +386,180 @@ 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
|
||||
@@ -369,6 +635,88 @@ const serverPath = userServerPath() || bundledBinary(context, 'lucisv-server') |
|
||||
|
||||
**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.**
|
||||
@@ -407,3 +755,31 @@ accepted:
|
||||
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.
|
||||
+262
-243
@@ -1,268 +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>
|
||||
|
||||
## 0. The short way: install a platform package
|
||||
<p align="center">
|
||||
Fast, coherent Verilog and SystemVerilog tooling—from the first keystroke to a workspace-wide refactor.
|
||||
</p>
|
||||
|
||||
A release carries **platform-specific `.vsix` packages with the binaries inside
|
||||
them** — one per machine — so there is nothing to build and nothing to put on
|
||||
`PATH`:
|
||||
<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>
|
||||
|
||||
```bash
|
||||
code --install-extension lucisv-0.10.0-darwin-arm64.vsix
|
||||
```
|
||||
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.
|
||||
|
||||
Pick the one matching the machine: `darwin-arm64`, `darwin-x64`, `linux-x64`,
|
||||
`linux-arm64`, `win32-x64`. The Linux packages are statically linked (musl), so
|
||||
they run on any distro. Inside the package the two binaries live at
|
||||
`bin/lucisv-server` and `bin/lucisv` (with `.exe` on Windows) under the
|
||||
extension's install directory; the extension spawns the server from there and
|
||||
makes both executable on first activation.
|
||||

|
||||
|
||||
`lucisv-<version>.vsix` — no suffix — is the **universal fallback** for any
|
||||
platform above that is not listed (Alpine, for instance, which VS Code treats as
|
||||
its own target, and every BSD). It carries no binaries and looks
|
||||
`lucisv-server` up on `PATH`, which is what sections 1–3 below describe.
|
||||
## Install
|
||||
|
||||
Setting `lucisv.serverPath` overrides the bundled server in either package — use
|
||||
it to point at a `target/release` build while you are working on the server
|
||||
itself. Only a value you actually set counts; leaving the setting alone keeps
|
||||
the bundled binary.
|
||||
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.
|
||||
|
||||
## 1. Build the server
|
||||
The current release is **0.10.2**. Its platform packages include both
|
||||
`lucisv-server` and the `lucisv` command-line tool:
|
||||
|
||||
```bash
|
||||
cargo build --release # from the repo root; binary at target/release/lucisv-server
|
||||
```
|
||||
| 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` |
|
||||
|
||||
Put it on your `PATH`:
|
||||
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.
|
||||
|
||||
```bash
|
||||
cp target/release/lucisv-server ~/.local/bin/ # or wherever your PATH points
|
||||
```
|
||||
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.
|
||||
|
||||
Or leave it in `target/release` and point the extension at it with the
|
||||
`lucisv.serverPath` setting (below).
|
||||
## Start using it
|
||||
|
||||
## 2. Smoke-test the spawn contract (no editor needed)
|
||||
Most features work as soon as a supported file opens:
|
||||
|
||||
`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.
|
||||
- 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.
|
||||
|
||||
```bash
|
||||
node smoke.js # `lucisv-server` from PATH
|
||||
node smoke.js ../../target/release/lucisv-server # an explicit binary
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
## 3. Install the extension
|
||||
|
||||
```bash
|
||||
npm ci # installs vscode-languageclient (the only dependency)
|
||||
npx @vscode/vsce package
|
||||
code --install-extension lucisv-0.5.0.vsix
|
||||
```
|
||||
|
||||
Then reload VS Code and open a `.v`/`.sv`/`.vh`/`.svh` file.
|
||||
|
||||
`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`.
|
||||
|
||||
**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, overriding the server bundled with the extension. A bare name is looked up on `PATH`; an absolute path is used as given. Unset, a platform package uses its own `bin/lucisv-server` and the universal package uses `PATH`. |
|
||||
| `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 |
|
||||
|
||||

|
||||
|
||||
## 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.** You are on the universal
|
||||
package and the server is not on `PATH` — install the platform package for
|
||||
your machine instead, or set `lucisv.serverPath` to an absolute path. Confirm
|
||||
the binary itself works with `node smoke.js <path>`.
|
||||
- **A `lucisv.serverPath` you set once is still winning.** It beats the bundled
|
||||
server by design, and it beats it silently. Clear the setting (not "set it
|
||||
back to `lucisv-server`" — that is a value you set, and it sends the extension
|
||||
back to `PATH`) to fall back to the binary inside the package.
|
||||
- **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).
|
||||
+24
-11
@@ -87,29 +87,42 @@ function userServerPath() {
|
||||
* The path to a binary this package carries under `bin/`, or `undefined` if it
|
||||
* carries none.
|
||||
*
|
||||
* The universal `.vsix` has no `bin/` at all and the platform-specific ones
|
||||
* have both binaries, so the file's existence is the runtime test that tells
|
||||
* the two packages apart (docs/features/editor-platform-vsix). 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
|
||||
* 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 = context.asAbsolutePath(
|
||||
path.join('bin', process.platform === 'win32' ? `${name}.exe` : name),
|
||||
);
|
||||
if (!fs.existsSync(file)) return undefined;
|
||||
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(file, 0o755);
|
||||
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 file;
|
||||
return found;
|
||||
}
|
||||
|
||||
/** Spawn the server and attach it to Verilog/SystemVerilog documents. */
|
||||
|
||||
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 |
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "lucisv",
|
||||
"version": "0.10.1",
|
||||
"version": "0.10.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "lucisv",
|
||||
"version": "0.10.1",
|
||||
"version": "0.10.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"vscode-languageclient": "9.0.1"
|
||||
|
||||
@@ -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.1",
|
||||
"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": [
|
||||
|
||||
+31
-19
@@ -26,20 +26,23 @@ for shops that require a native glibc link.
|
||||
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.
|
||||
up on `PATH` — is still built as the universal fallback, and one more package,
|
||||
`lucisv-<version>-all.vsix`, carries **all five pairs at once**.
|
||||
|
||||
| vsce target | rust triple |
|
||||
| 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 falls back to
|
||||
the universal package — an accepted gap, recorded in the feature README.
|
||||
`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):
|
||||
|
||||
@@ -132,9 +135,11 @@ dist/
|
||||
SHA256SUMS
|
||||
```
|
||||
|
||||
With `--cross` the loose binaries appear for all six triples and the remaining
|
||||
four platform packages (`darwin-x64`, `linux-x64`, `linux-arm64`, `win32-x64`)
|
||||
join them — twelve binaries and six `.vsix` files, plus `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:
|
||||
|
||||
@@ -182,12 +187,15 @@ npx @vscode/vsce package --target darwin-arm64 \
|
||||
`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, 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
|
||||
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. A
|
||||
stale `bin/` would otherwise ship one platform's server to another's users.
|
||||
`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
|
||||
|
||||
@@ -204,10 +212,13 @@ code --install-extension dist/lucisv-0.7.0.vsix # or: server from
|
||||
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` — and fall back to the universal
|
||||
`lucisv-<version>.vsix` anywhere else.
|
||||
`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 six `.vsix` packages plus `SHA256SUMS` to a
|
||||
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:
|
||||
@@ -264,10 +275,11 @@ 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, a pruning step that keeps
|
||||
**only the six `.vsix` packages** in `dist/` (each checked by name — a
|
||||
missing platform package fails the release — and `SHA256SUMS` filtered
|
||||
down to them and re-verified), `tools/release_notes.sh` (a missing
|
||||
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
|
||||
|
||||
Executable
+42
@@ -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
|
||||
+74
-14
@@ -16,7 +16,12 @@
|
||||
# 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. It publishes nothing anywhere.
|
||||
# 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]
|
||||
#
|
||||
@@ -146,7 +151,10 @@ vsce_target_for() { # rust triple -> vsce target name, empty if we ship none
|
||||
|
||||
# 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.
|
||||
# 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' ' ')
|
||||
@@ -184,6 +192,54 @@ package_vsix() { # vsce target, rust triple
|
||||
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"
|
||||
@@ -218,20 +274,24 @@ if [ "$want_vsix" -eq 1 ]; then
|
||||
package_vsix "$vsce_target" "$triple"
|
||||
done
|
||||
|
||||
# The host package gets one more check: unzip it and drive the *embedded*
|
||||
# server 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.
|
||||
# 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
|
||||
echo "==> smoke-testing the server embedded in the $host_vsce_target package"
|
||||
unpacked=$repo_root/target/vsix-check
|
||||
rm -rf "$unpacked"
|
||||
unzip -q "$dist/lucisv-$version-$host_vsce_target.vsix" -d "$unpacked"
|
||||
chmod +x "$unpacked/extension/bin/lucisv" "$unpacked/extension/bin/lucisv-server"
|
||||
node "$repo_root/editors/vscode/smoke.js" "$unpacked/extension/bin/lucisv-server"
|
||||
rm -rf "$unpacked"
|
||||
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
|
||||
|
||||
|
||||
Reference in new issue
Block a user