[GH-ISSUE #1572] Some core::version constants contain "VERGEN_IDEMPOTENT_OUTPUT" instead of something useful. #714

Open
opened 2026-02-27 19:32:06 +03:00 by kerem · 2 comments
Owner

Originally created by @kingosticks on GitHub (Sep 5, 2025).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1572

Description

When using librespot as a library, some core::version variables return "VERGEN_IDEMPOTENT_OUTPUT" instead of correct/useful values.

Version

All versions of librespot. This issue is due to a dependency.

How to reproduce

  1. cargo init librespot-version
  2. cd librespot-version
  3. cargo add librespot
  4. Edit src/main.rs as follows:
use librespot_core::version;
fn main() {
    println!("version::VERSION_STRING {}", version::VERSION_STRING);
    println!("version::BUILD_DATE {}", version::BUILD_DATE);
    println!("version::SHA_SHORT {}", version::SHA_SHORT);
    println!("version::COMMIT_DATE {}", version::COMMIT_DATE);
    println!("version::SEMVER {}", version::SEMVER);
    println!("version::BUILD_ID {}", version::BUILD_ID);
}
  1. cargo run

Log

version::VERSION_STRING librespot-VERGEN_IDEMPOTENT_OUTPUT
version::BUILD_DATE 2025-09-05
version::SHA_SHORT VERGEN_IDEMPOTENT_OUTPUT
version::COMMIT_DATE VERGEN_IDEMPOTENT_OUTPUT
version::SEMVER 0.7.1
version::BUILD_ID 2dJHc34q

Host (what you are running librespot on):

  • OS: Linux
  • Platform: x86

Additional context

This is a known limitation of vergen, see https://github.com/rustyhorde/vergen/issues/216. I think VERSION_STRING in particular is an issue for us, that one should be more sensible.

Originally created by @kingosticks on GitHub (Sep 5, 2025). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1572 ### Description When using librespot as a library, some `core::version` variables return "VERGEN_IDEMPOTENT_OUTPUT" instead of correct/useful values. ### Version All versions of librespot. This issue is due to a dependency. ### How to reproduce 1. `cargo init librespot-version` 2. `cd librespot-version` 3. `cargo add librespot` 4. Edit src/main.rs as follows: ``` use librespot_core::version; fn main() { println!("version::VERSION_STRING {}", version::VERSION_STRING); println!("version::BUILD_DATE {}", version::BUILD_DATE); println!("version::SHA_SHORT {}", version::SHA_SHORT); println!("version::COMMIT_DATE {}", version::COMMIT_DATE); println!("version::SEMVER {}", version::SEMVER); println!("version::BUILD_ID {}", version::BUILD_ID); } ``` 5. `cargo run` ### Log ``` version::VERSION_STRING librespot-VERGEN_IDEMPOTENT_OUTPUT version::BUILD_DATE 2025-09-05 version::SHA_SHORT VERGEN_IDEMPOTENT_OUTPUT version::COMMIT_DATE VERGEN_IDEMPOTENT_OUTPUT version::SEMVER 0.7.1 version::BUILD_ID 2dJHc34q ``` ### Host (what you are running `librespot` on): - OS: Linux - Platform: x86 ### Additional context This is a known limitation of vergen, see https://github.com/rustyhorde/vergen/issues/216. I think `VERSION_STRING` in particular is an issue for us, that one should be more sensible.
Author
Owner

@photovoltex commented on GitHub (Dec 25, 2025):

What do you think should be the expected behavior?

I have it currently working with fallbacks for VERGEN_GIT_SHA as stable and VERGEN_GIT_COMMIT_DATE as unknown? Any other suggestion or preference?

<!-- gh-comment-id:3691583545 --> @photovoltex commented on GitHub (Dec 25, 2025): What do you think should be the expected behavior? I have it currently working with fallbacks for `VERGEN_GIT_SHA` as `stable` and `VERGEN_GIT_COMMIT_DATE` as `unknown`? Any other suggestion or preference?
Author
Owner

@photovoltex commented on GitHub (Dec 25, 2025):

I created a PR for it. Let's continue the discussion there :)

<!-- gh-comment-id:3691608903 --> @photovoltex commented on GitHub (Dec 25, 2025): I created a PR for it. Let's continue the discussion there :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#714
No description provided.