Repository navigation
release: derive C version from Git tags for v0.1.0-preview.1 - #91
Merged
Merged
Conversation
Cargo.toml owns the package version. CMake derives the numeric project version from it for project(VERSION), while pkg-config and the CMake status line report the full pre-release version. The packaging manifest now records the same Cargo version, and documentation metadata follows it. The example provider lock only changes the path package version; dependency resolution is unchanged.
The locked Lance v15.0.0-beta.25 fixture has a 188-character relative test-data path. Cargo's default Windows checkout prefix pushes it to 261 characters, over MAX_PATH, so use C:\c as CARGO_HOME only on Windows and report the effective value. The longest checkout path becomes 238 characters. The Rust cache reads CARGO_HOME, so it caches the same short home.
Keep the unpublished Cargo package at 0.0.0. CMake, pkg-config, documentation and the package manifest now use a v-prefixed Git tag at HEAD, or 0.0.0-dev when the source is untagged or has no repository of its own. CMake keeps a numeric project version and passes the full version to the docs build. Tag dispatch fetches the tag ref after the exact-SHA checkout, requires its peeled commit to be HEAD, and records the tag object and commit for the package. A tag on a parent commit, another branch or an enclosing repository is not inherited.
Centralize strict SemVer in version.py for packaging, Sphinx and tag workflow validation. Resolve local tags from actual refs at HEAD instead of git describe, filter invalid and reserved tags first, and prefer the last stable tag in Git's version sort otherwise the last prerelease. Reject leading-zero, development and v-prefixed overrides consistently. Drop the Intel macOS package job so the first preview covers Linux amd64/arm64, Apple Silicon macOS, and Windows amd64/arm64. Leave the CMake/package target removal to the standalone cleanup change.
…ease-version # Conflicts: # .github/workflows/packages.yml
CMake no longer forwards its internal 0.0.0-dev fallback as LANCEDB_VERSION. Sphinx resolves the same tag or explicit override itself, so ordinary PR and untagged docs builds keep the strict public version semantics.
CMake forwards its resolved result to conf.py as LANCEDB_RESOLVED_VERSION, which takes precedence over the public LANCEDB_VERSION override for the docs build. Standalone Sphinx still uses the strict public resolution and rejects an explicit 0.0.0-dev. This keeps pkg-config, Doxyfile and Sphinx on the same configure-time release without treating the dev fallback as a user override.
version.resolve_version() no longer reads LANCEDB_RESOLVED_VERSION. docs/conf.py consumes it through parse_resolved(), so package.py cannot be overridden by the docs transport. Public LANCEDB_VERSION validation no longer strips whitespace, matching CMake's strict behavior.
Keep git tag output as one string and consume one complete newline-terminated tag at a time with string(FIND/SUBSTRING). Semicolons and unmatched brackets in Git-legal invalid tags are no longer CMake list delimiters, so they cannot swallow or reorder valid tags. Existing ref and peeled verification stay in place.
Xuanwo
added a commit
that referenced
this pull request
Nov 21, 2026
Integrate #91 tag-derived versioning and provenance with the five-platform package workflow. Keep package archives on v* tags and explicit dispatch, the strict selected-tag object and peeled-commit checks, the Windows native MSVC Debug consumer, Apple Silicon target policy, fast PR package fixtures, and read-only workflow token.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prepare the first C preview under the independent, tag-based C SemVer policy. The Cargo package is fixed at
0.0.0; CMake, pkg-config, documentation and the package manifest take the version from the exact Git tag at HEAD. Untagged trees and sources without their own Git repository report0.0.0-dev. The first release tag will bev0.1.0-preview.1; this PR creates no tag or release.The preview ships five native packages: Linux amd64/arm64, Apple Silicon macOS, and Windows amd64/arm64. Intel macOS is not built or released.
Version policy
vprefix: ASCII digits, no leading zeroes in major/minor/patch or numeric prerelease identifiers, no empty identifiers, and valid build metadata.v0.0.0-devis reserved for the untagged fallback..github/scripts/version.pyis the shared policy for packaging, standalone Sphinx and workflow tag validation. CMake implements the same policy without adding a Python dependency to ordinary builds. CMake keeps a numericproject(VERSION)and exposes the full pre-release text to the status line, pkg-config and Doxyfile.Tagged workflow dispatch
Create an annotated tag on the exact commit and dispatch
Shared Library Packageson that tag. The workflow keeps the exact-SHA checkout, validates the tag name with the shared Python policy, fetches the tag ref explicitly, and requires its peeled commit to equal the checked-out HEAD. It records the tag object, peeled commit and version for the package steps. A tag on a parent commit, another branch or an enclosing repository is rejected or ignored.The package manifest and consumer verification use the same peeled commit and tag version as the build. The workflow does not create tags or upload releases.
Main integration
Current main
5388ca84d6213aa9468518d2c7c7090c6bd5e602includes the Windows Cargo-home fix (#94) and the ordered update API (#81). The branch merges that main append-only at2c41461b930a03cd83fe749f595fcf12cc478367; the Windows fix appears exactly once.This branch removes the Intel macOS job so PR CI cannot schedule it. A separate cleanup PR owns the matching CMake/package target removal; after it lands, this branch will absorb that main commit without duplicating behavior.
Validation
Validated in isolated local fixtures; no tag was created in the product checkout and no remote tag was used:
0.0.0-dev;project(VERSION)is0.0.0.v0.1.0-preview.1: the same surfaces report0.1.0-preview.1; project version is0.1.0; standalone Sphinx on the tagged tree reports the tag version.0.0.0-dev, including cached local CMake reconfiguration.v0.0.0-devtags are ignored; a valid tag at the same commit is still selected. Multiple valid tags follow the documented stable-first rule..gitinside a tagged parent repository still reports0.0.0-dev.refs/tags/v0.1.0-preview.1^{}equals HEAD.cargo metadata --locked --offlinepasses for the root and example provider; workflow YAML has five targets and tag verification before build/package.2c41461.Migration notes for the preview
0.33.0was an unpublished Cargo version used across incompatible public headers. Do not use it as an ABI baseline. If a comparison needs a named baseline, use source commitb18804aor the final landed header. Recompile against the preview header.lancedb_connection_open_tablechanged shape. At0ae98b4it wasLanceDBTable* lancedb_connection_open_table(const LanceDBConnection*, const char*). The preview takes four arguments (LanceDBTable** table_out,char** error_message) and returnsLanceDBError. Update call sites and recompile.LANCEDB_UNKNOWNmoved from 22 to 99.22is nowLANCEDB_PERMISSION_DENIEDand23isLANCEDB_NOT_FOUND. Recompile and update any persisted numeric codes.LanceDBVectorIndexConfig.acceleratorandLanceDBScalarIndexConfig.force_update_statisticswere removed.LanceDBFtsIndexConfig.max_tokensbecamemax_token_length; the old field never took effect, so setmax_token_lengthwhen a single-token limit is required.LanceDBMergeInsertConfiggained condition fields; earlier clients that assign its fields individually must initialize both added condition pointers toNULLfor unconditional behavior. Recompile with updated initializers.lancedb_table_cleanup_old_versions,lancedb_table_compact_filesandlancedb_table_restore_versionreturned success without doing work. Clients that call them dynamically should remove those calls and use the supported optimize/restore paths where needed.key = "value"withkey = 'value'; double-quoted identifiers such as"Column Name"still work.nprobesunset now uses Lance's adaptive bounds instead of a fixed 20/20. Calllancedb_vector_query_nprobes(query, 20, ...)to keep the old fixed behavior.nprobes(0)fails at execution.lancedb_vector_query_nprobes()still returnsLANCEDB_SUCCESS;lancedb_vector_query_execute()returnsNULLandlancedb_vector_query_explain_plan()returnsLANCEDB_INVALID_INPUTwithnprobes must be greater than 0.lancedb_table_create_vector_indexnow creates a listed index instead of failing. Callers that relied on that failure should uselancedb_table_count_rows_with_status().db://connections reject custom sessions. Attaching a session then executing adb://connection returnsLANCEDB_NOT_SUPPORTED; omit the session and use server-managed caching.LanceDBUpdateResult(zero may mean unknown on legacy remote responses), and a public header that compiles as C. EXPLAIN plans now honor stored SQL filters.Re-evaluate these notes against the final landed headers before publication.
Locked release inputs
lancedb 0.42.0-beta.21, tagv0.42.0-beta.21, revisionb35cce60d66e5ae58e7ef470af7bd268d22c0396lance,lance-io,lance-namespace15.0.0-beta.25, tagv15.0.0-beta.25, revisionf5dbd55dd79f1f0412f897ed1917128300fb8c1alancedb-c 0.0.0,rust-version 1.95.0No tag, release, asset upload or merge is created here.