Skip to content

fix(c-api): stop reporting bogus 0.2.1 version when git tags are missing - #629

Open
chinaux wants to merge 1 commit into
alibaba:mainfrom
chinaux:fix/c-api-version-fallback
Open

fix(c-api): stop reporting bogus 0.2.1 version when git tags are missing#629
chinaux wants to merge 1 commit into
alibaba:mainfrom
chinaux:fix/c-api-version-fallback

Conversation

@chinaux

@chinaux chinaux commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

When 'git describe' cannot produce a vX.Y.Z tag (shallow clones, tarball builds), the C API version headers were silently baked with a plausible-looking 0.2.1, lying about the ABI identity. Following DuckDB's approach: add OVERRIDE_GIT_DESCRIBE cache variable so packagers/CI can inject an explicit version (with format validation, FATAL_ERROR on malformed input), and fall back to an obviously-dummy v0.0.0 with a loud warning, keeping the commit hash for traceability. Fixes #621

When 'git describe' cannot produce a vX.Y.Z tag (shallow clones, tarball builds), the C API version headers were silently baked with a plausible-looking 0.2.1, lying about the ABI identity. Following DuckDB's approach: add OVERRIDE_GIT_DESCRIBE cache variable so packagers/CI can inject an explicit version (with format validation, FATAL_ERROR on malformed input), and fall back to an obviously-dummy v0.0.0 with a loud warning, keeping the commit hash for traceability. Fixes alibaba#621
@chinaux
chinaux requested a review from Cuiyus as a code owner July 28, 2026 12:05
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.

[Bug]: C API reports version 0.2.1 when git tags are missing (shallow clones)

1 participant