Skip to content

Conversation

@photovoltex
Copy link
Member

Adds default values for the vergen-gitcl git values, when no .git folder is found for the dependency.

Fixes #1572

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds fallback handling for vergen-gitcl when git information is unavailable (e.g., when the package is used as a dependency without a .git folder), fixing issue #1572 where version constants would contain VERGEN_IDEMPOTENT_OUTPUT.

  • Implements error handling for git value generation with sensible fallback defaults
  • Refactors build ID generation to use more idiomatic Rust syntax
  • Updates changelog to document the fix

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
core/build.rs Adds error handling for missing git repo with fallback values ("stable" for SHA, "unknown" for commit date), splits git and build emission into separate operations, and refactors build_id assignment to use unwrap_or_else
CHANGELOG.md Documents the fix for version constants containing VERGEN_IDEMPOTENT_OUTPUT

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Some core::version constants contain "VERGEN_IDEMPOTENT_OUTPUT" instead of something useful.

1 participant