Skip to content

Report the comline-core commit in --version - #165

Merged
Kinflou merged 1 commit into
mainfrom
feat/version-core-rev
Nov 15, 2026
Merged

Kinflou merged 1 commit into
mainfrom
feat/version-core-rev

Conversation

@Kinflou

@Kinflou Kinflou commented Nov 15, 2026

Copy link
Copy Markdown
Member

For ComlineProject/comline-vscode#32: the extension compares the comline-core its language server was built with against the one the CLI uses, and warns when they differ. The language server reports its commit (language-server#125); this is the CLI side. comline --version didn't say which core it links.

What changes

comline --version gets one more line, in the form its other lines already use:

comline 0.2.0
commit-hash: 8590a0a8e2c1
commit-branch: main
commit-count: 123
build-date: 2026-11-16 10:00:00 UTC
core-rev: 14ce54658455206d639ddc4fbe6d609d20292587

core-rev: is the full 40-hex commit, or unknown. -V stays the bare version.

The commit is the #<sha> of the comline-core git source in Cargo.lock, read in build.rs (no new dependency). A build that sees no lock (cargo install without --locked) falls back to the full rev in Cargo.toml's comline-core line, then to unknown. build.rs now also reruns when Cargo.toml or Cargo.lock change, so a bump to the pin is picked up.

Tests

global::version_reports_the_core_rev_it_links: --version has a core-rev: line of 40 hex, and it is the rev Cargo.toml pins.

CI

Tests run in CI.

@Kinflou
Kinflou marked this pull request as ready for review November 15, 2026 20:31
@Kinflou
Kinflou merged commit 97d01e7 into main Nov 15, 2026
13 checks passed
@Kinflou
Kinflou deleted the feat/version-core-rev branch November 15, 2026 20:31
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.

1 participant