proper reporting of rust version based on git commit hash - build-info#123
Open
stephen-derosa wants to merge 2 commits into
Open
proper reporting of rust version based on git commit hash - build-info#123stephen-derosa wants to merge 2 commits into
stephen-derosa wants to merge 2 commits into
Conversation
7de6a21 to
93c8e84
Compare
alan-george-lk
approved these changes
May 12, 2026
| @@ -0,0 +1,8 @@ | |||
| { | |||
Collaborator
There was a problem hiding this comment.
Very minor suggestion: since this is a build info/bundled version thing and isn't really user-facing, consider an alternative sub-folder (besides root) for it
Collaborator
Author
There was a problem hiding this comment.
.build-info.json.in ?
ladvoc
reviewed
May 12, 2026
|
|
||
| set(LIVEKIT_FFI_VERSION "unknown") | ||
| set(LIVEKIT_FFI_CARGO_TOML "${RUST_ROOT}/livekit-ffi/Cargo.toml") | ||
| if(EXISTS "${LIVEKIT_FFI_CARGO_TOML}") |
Contributor
There was a problem hiding this comment.
suggestion: Might not be worth doing here because of the dep on jq, but this could be more robust:
cargo metadata --format-version 1 | jq -r '.packages[] | select(.name=="livekit-ffi").version'9d7abc5 to
cb091f6
Compare
xianshijing-lk
approved these changes
May 12, 2026
| @@ -0,0 +1,8 @@ | |||
| { | |||
| "sdk": "cpp", | |||
| "sdk_version": "@LIVEKIT_VERSION@", | |||
Collaborator
There was a problem hiding this comment.
should you use the sanitized LIVEKIT_PROJECT_VERSION instead ?
| endif() | ||
| endif() | ||
|
|
||
| string(TIMESTAMP BUILD_DATE "%Y-%m-%d %H:%M:%S") |
Collaborator
There was a problem hiding this comment.
nite, BUILD_DATE is local time ?
maybe we can consider something like
string(TIMESTAMP BUILD_DATE "%Y-%m-%dT%H:%M:%SZ" UTC)
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.
Overview
Fixes C++ SDK version reporting by sending the release version (LIVEKIT_BUILD_VERSION) to the Rust FFI instead of the build-flavored value (LIVEKIT_BUILD_VERSION_FULL, e.g. 1.2.3-release).
Also adds release provenance metadata to SDK bundles via share/livekit/build-info.json, recording the C++ SDK version, C++ commit, Rust submodule commit, and bundled livekit-ffi crate version. Release CI now validates that bundled artifacts include the expected version metadata and do not fall back to 0.0.0.
Validation:
Added a C++ unit test to ensure the server-facing version does not include -debug / -release.
Verified bundle install produces expected build.h and build-info.json.
BOT-348
Related MR