Skip to content

Prepare 0.3.0: tool management and current VLS compatibility - #554

Merged
JalonSolov merged 15 commits into
vlang:masterfrom
tomaszbk:refactor/extension-reliability
Oct 6, 2026
Merged

JalonSolov merged 15 commits into
vlang:masterfrom
tomaszbk:refactor/extension-reliability

Conversation

@tomaszbk

@tomaszbk tomaszbk commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Prepare 0.3.0 with managed V/VLS installation and updates, current VLS compatibility, reliable language-server recovery, and formatting and syntax fixes. Requires VS Code 1.140.0 or newer.

Changes

  • VLS compatibility: requires VLS 0.0.3 or newer, as reported by vls --version, for external and managed servers alike. Older or unidentified servers offer V: Install or Update VLS.
  • Managed V and VLS: builds official sources in isolated, cancellable builds and verifies them before use. The selection is stored per machine, so Settings Sync never shares local paths. An update deletes the build it replaces; other windows still using it ask to reload.
  • Updates: at most daily checks against V master or its latest release (v.tools.updateChannel); VLS tracks master.
  • Language server: serialized restarts, crash recovery, status and logs. Settings from the former VLS extension keep working.
  • Formatting: formats unsaved buffers through stdin, independently of VLS.
  • Fixes and tooling: optimized builds through tasks, bounded numeric highlighting, an SVG V file icon, and TypeScript 7 with type-aware Oxlint/Oxfmt.

Upstream integration

Incorporates the dependency update merged in #568, including engines.vscode: ^1.140.0 and @types/vscode: 1.140.0, while retaining extension version 0.3.0 and the migration to Oxc. The resolved manifest uses Oxlint 1.87.0, Oxfmt 0.72.0, TypeScript 7.0.2, and the latest Node 24 API types (24.19.1). Shared runtime/build dependencies remain at the current stable versions: languageclient 10.1.2, vsce 4.0.0, esbuild 0.28.2, and markdownlint-cli 0.49.1.

Dependency

Requires vlang/vls#537, which adds vls --version (VLS 0.0.3). Until it is merged, CI builds VLS from commit e61d428.

Issue scope

Validation

The current integration was verified locally on macOS arm64 with Node 26.6.0, VS Code 1.140.0, V 01eb669, and VLS e61d428:

  • Clean locked dependency installation, npm test (111 logic/adapter tests, TypeScript, Oxlint, and Oxfmt checks), all 14 grammar fixtures, README lint, Actionlint, and VSIX packaging pass.
  • Installed-VSIX fixture-host tests pass, including tasks, unsaved-buffer formatting, LSP wiring, restarts, crash recovery, rejection of VLS 0.0.2, and issue v.fmt not working #523 with VLS missing.
  • Real-VLS host tests pass: completion, hover, definition, three-file rename, collision refusal, formatting, auto-imports, inlay hints, outline, and supported folding. Completed host logs contain no failed configuration or document notifications.
  • Windows and Linux runtime checks were not rerun for this integration. CI remains configured for Node 24 and Linux/macOS extension hosts.
  • npm audit reports five pre-existing low/moderate development-tool advisories through markdownlint-cli; no high or critical advisories. Its KaTeX and smol-toml versions are unchanged by this integration.

@tomaszbk tomaszbk changed the title Prepare 0.3.0: managed tools, VLS recovery and Oxc migration Prepare 0.3.0: managed tools, VLS recovery and bug fixes Sep 30, 2026
tomaszbk and others added 3 commits September 30, 2026 12:24
Seti and other icon themes without a V icon fall back to the language
icon, so .v, .vsh, .vh, .vv and v.mod files now get the official V logo
(examples/assets/v.svg from vlang/v).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v version prints a seven-character hash, which GitHub cannot resolve
across the vlang/v fork network, so every V built from a clone was
reported as unverifiable. Expand it with git in the compiler's clone.

v.tools.updateChannel lets V track its latest release instead of
master. VLS has no regular releases and keeps tracking master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The server being replaced also receives the disabled settings, so the
test could pick its pid after the restart had already ended it, and
process.kill failed with ESRCH.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tomaszbk
tomaszbk marked this pull request as draft October 1, 2026 12:43
@tomaszbk
tomaszbk force-pushed the refactor/extension-reliability branch from 1280180 to d3a6295 Compare October 1, 2026 13:21
@tomaszbk
tomaszbk marked this pull request as ready for review October 1, 2026 14:30
@tomaszbk tomaszbk changed the title Prepare 0.3.0: managed tools, VLS recovery and bug fixes Prepare 0.3.0: managed tools and verified V3 VLS integration Oct 5, 2026
@tomaszbk tomaszbk changed the title Prepare 0.3.0: managed tools and verified V3 VLS integration Prepare 0.3.0: tool management and current VLS compatibility Oct 5, 2026
- Store managed V/VLS selections in globalState instead of settings, so
  Settings Sync never shares machine-specific paths; the default settings
  use the managed build before PATH. Accepting an installation resets an
  explicit path setting to its default.
- Delete the managed build an update replaces. One that cannot be moved
  yet, such as a running executable on Windows, stays marked and is
  retried on the next activation or installation; builds interrupted more
  than a day ago are removed. Other windows whose VLS still uses a
  replaced build ask to reload.
- Check that V accepts -new-compiler before downloading VLS, and resolve
  Windows GNU make before building V.
- Always ask for missing V when the user accepts installing VLS, and
  explain when a manual request waits for an unanswered prompt or a
  running installation.
- Offer a version-only VLS update on manual checks when upstream declares
  a newer vls_version.
- Show a single startup notification for an unsupported VLS, with a
  clearer message for servers older than 0.0.3.
- Inspect managed VLS in startup order: stamped metadata, reported
  version, then commit ancestry.
- Retry unavailable update checks, remember declined missing-tool prompts,
  bound stored check state, and report unreachable VLS ancestry checks as
  unavailable rather than unsupported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tomaszbk
tomaszbk force-pushed the refactor/extension-reliability branch from 9d38b14 to 0243361 Compare October 5, 2026 20:17
VLS 0.0.3 (vlang/vls#537) reports its version through `vls --version`,
so support no longer needs commit ancestry. External and managed servers
are both accepted when they report 0.0.3 or newer, which also works
offline. Building VLS verifies the new binary the same way instead of
fetching full history to check for 4f668aa.

Remove the ancestry checks through Git and the GitHub compare API, the
managed baseline stamp and the revision-only identity formats. Managed
metadata now only records the built commit and executable hash for
update checks.

Also wait for the old server's shutdown, rather than a fixed delay, in
the integration test that rejects an external VLS 0.0.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@metif12

metif12 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Noticed the overlap with two of my PRs and would rather ask than pile on.

I opened #556 and
#557 against master a few hours
ago, before I found this one. Both are superseded by what is here, and I can
close them:

#556 — installV deleted ~/.local/bin outright before cloning, because the
directory was treated as though it only ever held V:

const userBinPath = path.join(os.homedir(), ".local", "bin")
// ...
if (fs.existsSync(installDir)) {
    fs.rmSync(installDir, { recursive: true, force: true })
}

That is the same defect as the #555 you list, and this PR fixes it structurally
rather than by narrowing the delete: tools live under storageRoot/tools, which
the extension owns, and every fs.rm in toolInstallation.ts is scoped to a
directory it just created or guarded by path.dirname(directory) !== toolsDirectory
plus an lstat().isSymbolicLink() check. I did not have that idea when I wrote
#556, so closing it costs nothing.

#557 — activation raised two information messages on every window open,
V: Update VLS reported "VLS has been restarted after update" after restarting
without fetching anything, v.vls.openOutput was registered but never declared in
contributes.commands, and a showInformationMessage(...).then(...) on the
config listener mutated the shared client outside the awaited path. This PR covers
the same ground as "serialized restarts, crash recovery, status and logs" — the
private pending: Promise.resolve() queue in langserver.ts is a better answer
to the restart race than the flag I added.

Two smaller things from #557 that may be worth folding in here, if they are still
true on this branch:

  • v.vls.openOutput needs to appear in contributes.commands or it is
    unreachable from the Command Palette and cannot be bound to a key. If
    v.vls.update sets status.command on failure (langserver.ts), it has to be
    declared too.
  • npm run fmt is prettier -w ., and running it reformats the whole repository
    into single quotes, which then fails npm run lint — seven errors in files the
    user never touched. I hit this on fix: stop deleting the user's bin directory when installing V #556 and reverted it. Switching to Oxlint and
    Oxfmt settles it, which is one more reason this branch is the right place to
    land.

Nothing here depends on #554 or #557:

  • #558 offers v mcp serve as
    an MCP server, one per workspace folder, read-only by default.
  • #559 adds commands for the
    agent skills the compiler ships.

v mcp and v skills are not mentioned anywhere in this PR's description or its
file list, so I read them as separate work. Tell me if they are in scope for 0.3.0
and I will hold them.

The question, then: shall I close #556 and #557 in favour of this one? I am happy
either way — the bugs are real on master today, so if you would rather fix them
before this lands, say so and I will rebase them instead.

One note on the queued runs: both jobs have been queued for about twelve hours
with no runner. If that is a fork-approval thing rather than a busy queue I can
re-run them on request.

@tomaszbk

tomaszbk commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Hi @metif12 ! Yes, closing #556 and #557 in favor of this PR makes sense. Both VLS commands are already declared in contributes.commands, and formatting uses Oxfmt with Oxlint.
MCP and compiler skills are outside this PR’s scope, so please continue those separately.

@JalonSolov

Copy link
Copy Markdown

Conflicts to resolve, after recent merges.

@tomaszbk

tomaszbk commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Solved @JalonSolov

@JalonSolov
JalonSolov merged commit 2229cf9 into vlang:master Oct 6, 2026
metif12 pushed a commit to metif12/vscode-vlang that referenced this pull request Oct 7, 2026
A contributor opening a pull request today has no way to tell which problems
are already known, which are being worked on, and which are deliberately
out of scope. That shows up as duplicated effort, and it is avoidable.

The list is ordered by cost rather than by importance, so a fix that lands
today is never waiting on a bigger one. `golang.go` is the reference point, not
the target: it is about ten times this extension's source and has had years of
dedicated work, so the goal is to stop spending developer time on things the
editor can already answer.

Where vlang#554 already implements something, the item says so rather than
repeating it.

Items marked as defects are defects on master today, including three tests
that fail on Windows while CI runs only on ubuntu-latest.

markdownlint now covers ROADMAP.md as well, so the two documents stay under the
same gate.
metif12 pushed a commit to metif12/vscode-vlang that referenced this pull request Oct 7, 2026
A contributor opening a pull request today has no way to tell which problems
are already known, which are being worked on, and which are deliberately
out of scope. That shows up as duplicated effort, and it is avoidable.

The list is ordered by cost rather than by importance, so a fix that lands
today is never waiting on a bigger one. `golang.go` is the reference point, not
the target: it is about ten times this extension's source and has had years of
dedicated work, so the goal is to stop spending developer time on things the
editor can already answer.

Where vlang#554 already implements something, the item says so rather than
repeating it.

Items marked as defects are defects on master today, including three tests
that fail on Windows while CI runs only on ubuntu-latest.

markdownlint now covers ROADMAP.md as well, so the two documents stay under the
same gate.
tomaszbk added a commit to tomaszbk/vscode-vlang that referenced this pull request Oct 7, 2026
Use the current upstream implementation, including the tool management refactor merged in vlang#554, while preserving the previous fork commits as merge ancestry.
metif12 pushed a commit to metif12/vscode-vlang that referenced this pull request Oct 9, 2026
A contributor opening a pull request today has no way to tell which problems
are already known, which are being worked on, and which are deliberately
out of scope. That shows up as duplicated effort, and it is avoidable.

The list is ordered by cost rather than by importance, so a fix that lands
today is never waiting on a bigger one. `golang.go` is the reference point, not
the target: it is about ten times this extension's source and has had years of
dedicated work, so the goal is to stop spending developer time on things the
editor can already answer.

Where vlang#554 already implements something, the item says so rather than
repeating it.

Items marked as defects are defects on master today, including three tests
that fail on Windows while CI runs only on ubuntu-latest.

markdownlint now covers ROADMAP.md as well, so the two documents stay under the
same gate.
JalonSolov pushed a commit that referenced this pull request Oct 10, 2026
* docs: add a roadmap of known gaps

A contributor opening a pull request today has no way to tell which problems
are already known, which are being worked on, and which are deliberately
out of scope. That shows up as duplicated effort, and it is avoidable.

The list is ordered by cost rather than by importance, so a fix that lands
today is never waiting on a bigger one. `golang.go` is the reference point, not
the target: it is about ten times this extension's source and has had years of
dedicated work, so the goal is to stop spending developer time on things the
editor can already answer.

Where #554 already implements something, the item says so rather than
repeating it.

Items marked as defects are defects on master today, including three tests
that fail on Windows while CI runs only on ubuntu-latest.

markdownlint now covers ROADMAP.md as well, so the two documents stay under the
same gate.

* docs: close the roadmap gaps, list what is next

Every gap this file named is now closed (twelve PRs plus the pre-existing TaskProvider, verified rather than duplicated). Restructure around that: a short open list ordered cheapest first (toggle test file, snippet repair, fill-struct action, playground share, docs index) and a done record with PR references. Points at the new extension comparison.

---------

Co-authored-by: office <office@local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants