Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 1, 2025

CLI reports hardcoded 0.3.8 regardless of actual release version.

Changes

  • main.go: Replace const VERSION = "0.3.8" with var Version = "dev" settable via -ldflags
  • Makefile: Auto-inject version from git tags during build
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
LDFLAGS=-ldflags "-X main.Version=$(VERSION)"

Now make && ./clickhouse-sql-parser -v outputs v0.4.17 (or current tag).

Original prompt

This section details on the original issue you should resolve

<issue_title>Version mismatch: Tool reports 0.3.8 while latest release is 0.4.17</issue_title>
<issue_description>Description:

I’ve noticed a discrepancy between the version displayed by the tool and the latest release available on GitHub.

Observed behavior:

When checking the tool’s version via CLI, it reports version 0.3.8.

Expected behavior:

The tool should reflect the latest released version, which is 0.4.17 GitHub releases page.

Environment:

  • OS: macOS
  • Tool installation method: brew (/opt/homebrew/Cellar/clickhouse-sql-parser/0.4.17: 6 files, 2.8MB)
    </issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…time

Co-authored-by: git-hulk <4987594+git-hulk@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix version mismatch to reflect latest release 0.4.17 Fix version mismatch: inject version at build time via ldflags Dec 1, 2025
Copilot AI requested a review from git-hulk December 1, 2025 09:00
Copilot finished work on behalf of git-hulk December 1, 2025 09:00
@git-hulk git-hulk marked this pull request as ready for review December 1, 2025 09:38
@coveralls
Copy link

coveralls commented Dec 1, 2025

Pull Request Test Coverage Report for Build 19816870898

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 51.054%

Totals Coverage Status
Change from base Build 19558226329: 0.0%
Covered Lines: 7943
Relevant Lines: 15558

💛 - Coveralls

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.

Version mismatch: Tool reports 0.3.8 while latest release is 0.4.17

3 participants