Skip to content

Expose VLS 0.0.3 through CLI and LSP - #537

Merged
JalonSolov merged 1 commit into
vlang:masterfrom
tomaszbk:codex/vls-version-0-0-3
Oct 7, 2026
Merged

JalonSolov merged 1 commit into
vlang:masterfrom
tomaszbk:codex/vls-version-0-0-3

Conversation

@tomaszbk

@tomaszbk tomaszbk commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

VLS still reports 0.0.2 after the compiler integration and language-server changes in #524 and
#525. Clients cannot distinguish those builds from older ones, and an external binary has no
reliable version command that lets an editor decide whether to offer an update.

Set the server version to 0.0.3 in one constant and expose it through both LSP
initialize.serverInfo.version and vls --version / vls version. The CLI commands print
VLS 0.0.3 and exit successfully before logging, creating temporary state, opening stdin or TCP,
or looking for the V compiler. A version word used as a transport argument does not select the
version command.

Validation on macOS with V 01eb669:

  • Normal root build: v ..
  • v fmt -verify main.v main_test.v integration_test.v.
  • Targeted CLI argument and both LSP initialization regression tests: 2 test files passed.
  • Actual subprocess checks for both aliases with stdin kept open and an empty PATH: exit 0,
    exact output, no stderr or temporary state, and no installed V required.
  • Actual stdio initialize/shutdown: serverInfo reports 0.0.3, framing remains valid, exit 0.

This lets editors accept an independently installed VLS by its version, without requiring
installation from an editor or a Git checkout. It supports the compatibility check in
vlang/vscode-vlang#554.

tomaszbk added a commit to tomaszbk/vscode-vlang that referenced this pull request Oct 5, 2026
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>
JalonSolov pushed a commit to vlang/vscode-vlang that referenced this pull request Oct 6, 2026
* feat: prepare 0.3.0 with managed tools, VLS recovery and Oxc

* feat: show the V logo as the file icon for V files

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>

* feat: add V update channel and verify abbreviated V revisions

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>

* test: kill only a VLS started by the restart in crash recovery

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>

* fix: harden 0.3.0 formatting, tool updates and VLS lifecycle

* fix: optically align V fallback icon with Seti

* fix: synchronize VLS integration tests and broaden settings access

* fix: find MSYS2 make for Windows VLS compatibility

* ci: pin a compatible V bootstrap snapshot

* feat: require current VLS and verify V3 integration

* ci: validate workflows and scope runner environment to steps

* fix: accept external VLS by version or revision without compiler probes

* fix: keep managed tools machine-local and harden install and update flow

- 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>

* refactor: check VLS compatibility by its reported version only

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>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@JalonSolov
JalonSolov merged commit 34ede14 into vlang:master Oct 7, 2026
@tomaszbk
tomaszbk deleted the codex/vls-version-0-0-3 branch October 7, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants