Skip to content

build: cargo update and vergen 8 -> vergen-gitcl 10#44

Merged
nerdCopter merged 3 commits into
masterfrom
20260626_cargo_update
Jul 2, 2026
Merged

build: cargo update and vergen 8 -> vergen-gitcl 10#44
nerdCopter merged 3 commits into
masterfrom
20260626_cargo_update

Conversation

@nerdCopter

@nerdCopter nerdCopter commented Jul 2, 2026

Copy link
Copy Markdown
Owner

AI Generated pull-request

Summary

  • cargo update: broad dependency bump across the tree (clap 4.5.40 -> 4.6.1, serde 1.0.140 -> 1.0.150, regex 1.11.1 -> 1.12.4, syn 2.0.103 -> 2.0.118, time 0.3.47 -> 0.3.53, libc 0.2.173 -> 0.2.186, and others), plus new transitive deps (bon, bon-macros, darling, darling_core, darling_macro, ident_case, prettyplease).
  • vergen 8 -> vergen-gitcl 10: replaced EmitBuilder/git_sha/git_commit_date with Emitter/Gitcl::all_git() in build.rs and Cargo.toml. VERGEN_GIT_SHA/VERGEN_GIT_COMMIT_DATE env var names are unchanged, so no downstream code changes were needed.

Test plan

  • cargo build --release and cargo test --release pass (19 unit/integration tests + 3 doc-tests)
  • Compared new binary against pre-update binary on 5 EMUF*.BBL, 1 BTFL*.BBL, and 2 BTFL*.bfl logs (with --gpx --event) — all 30 output files byte-identical

nerdCopter and others added 3 commits June 26, 2026 15:46
- Replace vergen 8 (EmitBuilder) with vergen-gitcl 10 (Emitter + Gitcl::all_git())
- Git env var names (VERGEN_GIT_SHA, VERGEN_GIT_COMMIT_DATE) unchanged
- All 75 tests pass, output identical to master build across 24 BBL test files
Bump time 0.3.51 -> 0.3.53 and time-macros 0.2.30 -> 0.2.31 via cargo update.

Verified: cargo build --release and cargo test --release pass; output of the
new binary is byte-identical to the pre-update binary across 5 EMUF*.BBL,
1 BTFL*.BBL, and 2 BTFL*.bfl blackbox logs (headers.csv, .csv, and .event
exports, with --gpx --event enabled).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The build dependency vergen was replaced with vergen-gitcl version 10 in Cargo.toml. build.rs was updated accordingly, switching from vergen::EmitBuilder with explicit git field configuration to vergen_gitcl::Emitter with a Gitcl::all_git() preset instruction set.

Changes

Vergen to vergen-gitcl migration

Layer / File(s) Summary
Dependency and emitter update
Cargo.toml, build.rs
Build dependency switched from vergen to vergen-gitcl "10", and build.rs now builds a vergen_gitcl::Emitter with Gitcl::all_git() preset instructions instead of explicit EmitBuilder field configuration.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

  • nerdCopter/bbl_parser#21: Introduced the original vergen-based build.rs and dependency that this PR replaces with vergen-gitcl.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main changes: a cargo dependency update and migration from vergen to vergen-gitcl 10.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 20260626_cargo_update

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nerdCopter nerdCopter marked this pull request as ready for review July 2, 2026 20:14
@nerdCopter

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nerdCopter nerdCopter changed the title build: cargo update (time 0.3.51->0.3.53) build: cargo update and vergen 8 -> vergen-gitcl 10 Jul 2, 2026
@nerdCopter

nerdCopter commented Jul 2, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai, analyze if the vergen changes are correct/proper.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
cat -n build.rs
echo "----"
cat -n Cargo.toml | sed -n '1,60p'
echo "----"
fd Cargo.lock -x grep -n -A3 'name = "vergen' {}

Length of output: 2422


🤖 web_search executed:

vergen-gitcl 10 Emitter add_instructions Gitcl::all_git example usage

Length of output: 9672


@nerdCopter, I checked this against the vergen-gitcl v10 docs and the change looks correct and proper.

Why it's correct:

  • Since vergen v9, the git-based backends (gitcl, git2, gix) were split out of the base vergen crate into independent crates — vergen-gitcl, vergen-git2, vergen-gix — specifically to avoid feature-unification conflicts when multiple dependencies pull in vergen with different git backends. The base vergen crate itself no longer has git features at all.
  • Cargo.toml now depends directly on vergen-gitcl = "10" instead of vergen with features = ["git", "gitcl"], which is the correct replacement. Cargo.lock confirms vergen 10.0.1, vergen-gitcl 10.0.1, and vergen-lib 10.0.1 are all present and consistent — vergen is now just a transitive dependency pulled in by vergen-gitcl.
  • build.rs now does:
    use vergen_gitcl::{Emitter, Gitcl};
    
    fn main() -> Result<()> {
        Emitter::default()
            .add_instructions(&Gitcl::all_git())?
            .emit()?;
        Ok(())
    }
    This is an exact match for the documented example on docs.rs for vergen_gitcl::Gitcl::all_git():
    let gitcl = Gitcl::all_git();
    Emitter::default().add_instructions(&gitcl)?.emit()?;

Functionally, Gitcl::all_git() is equivalent to the old EmitBuilder::builder().git_sha(true).git_commit_date(true) approach but emits all VERGEN_GIT_* variables rather than just the two you previously enabled explicitly. If you only need git_sha and git_commit_date and want to avoid emitting the extra VERGEN_GIT_* env vars, you could instead use GitclBuilder::default().sha(true).commit_date(true).build()? for a tighter equivalent — but functionally your build/test results (byte-identical outputs) suggest this isn't causing any behavioral difference in your case, so all_git() is a fine and simpler choice.

Overall: no correctness issues, this is a clean and idiomatic migration to vergen-gitcl v10.


✏️ Learnings added
Learnt from: nerdCopter
URL: https://github.com/nerdCopter/bbl_parser/pull/44

Timestamp: 2026-07-02T20:17:30.615Z
Learning: Repository nerdCopter/bbl_parser: build.rs uses vergen-gitcl (not vergen with git features) since vergen v9+ split git backends into separate crates (vergen-gitcl, vergen-git2, vergen-gix). The correct pattern is `use vergen_gitcl::{Emitter, Gitcl}; Emitter::default().add_instructions(&Gitcl::all_git())?.emit()?;` in build.rs, with `vergen-gitcl = "10"` in build-dependencies of Cargo.toml.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@nerdCopter nerdCopter merged commit 9e93c7c into master Jul 2, 2026
9 checks passed
@nerdCopter nerdCopter deleted the 20260626_cargo_update branch July 2, 2026 20:22
nerdCopter added a commit that referenced this pull request Jul 2, 2026
AI Generated pull-request

## Summary
- The `vergen` 8 -> `vergen-gitcl` 10 migration (#44) switched
`build.rs` from `EmitBuilder::git_sha(true)` (short SHA) to
`Gitcl::all_git()`, which emits the full 40-char `VERGEN_GIT_SHA`
instead.
- Regression: `bbl_parser --version` now prints the full SHA
(`bbl_parser 1.0.1 76b67b5
(2026-07-02)`) instead of the short one used since 1.0.0 (`bbl_parser
1.0.0 03b87d3 (2025-12-30)`).
- Fix: `Gitcl::all().sha(true).build()` keeps all other `VERGEN_GIT_*`
instructions enabled while restoring short-SHA output
(`Gitcl::builder().all()` is a private crate-internal method, so
`Gitcl::all()` is the public equivalent).

## Test plan
- [x] `cargo build --release` and `cargo test --release` pass (19
unit/integration tests + 3 doc-tests)
- [x] `bbl_parser --version` now prints a 7-char short SHA (e.g.
`61448ef`)

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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