Skip to content

Unify reported snarkOS versions through .cargo/release-version#4287

Merged
vicsn merged 2 commits into
stagingfrom
copilot/bugfix-registered-versions
Jun 10, 2026
Merged

Unify reported snarkOS versions through .cargo/release-version#4287
vicsn merged 2 commits into
stagingfrom
copilot/bugfix-registered-versions

Conversation

Copilot AI commented May 29, 2026

Copy link
Copy Markdown
Contributor

Reported versions were coming from multiple crate-local sources (CARGO_PKG_VERSION / PKG_VERSION), which required updating the same release number in several places. This change makes the user-facing/runtime-reported version come from a single root source: .cargo/release-version.

  • Centralize the reported version

    • Added shared build-script logic to read .cargo/release-version
    • Normalizes the stored tag (v4.6.04.6.0)
    • Exposes the result uniformly as SNARKOS_VERSION
  • Switch version consumers to the shared source

    • Updated the CLI updater to use SNARKOS_VERSION instead of crate-local CARGO_PKG_VERSION
    • Updated REST and metrics version reporting to stop reading built_info::PKG_VERSION
    • Updated the CDN user agent to use the shared version value
  • Align CLI version output

    • snarkos --version now includes the unified release version alongside git branch/commit and enabled features
  • Add a focused guardrail

    • Added a unit test in the CLI crate that asserts SNARKOS_VERSION matches .cargo/release-version
.current_version(env!("SNARKOS_VERSION"))

This keeps reported versions tied to one root file without changing the existing package/dependency version structure used by the workspace.

Copilot AI linked an issue May 29, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix multiple registrations of package versions Unify reported snarkOS versions through .cargo/release-version May 29, 2026
Copilot AI requested a review from vicsn May 29, 2026 09:50
Copilot finished work on behalf of vicsn May 29, 2026 09:50
Comment thread node/rest/build.rs
Comment thread node/metrics/build.rs
Copilot finished work on behalf of vicsn June 4, 2026 14:50
Copilot AI requested a review from vicsn June 4, 2026 14:50
@vicsn vicsn requested a review from ljedrz June 9, 2026 17:03
@vicsn vicsn marked this pull request as ready for review June 10, 2026 09:49
@vicsn vicsn merged commit 2e5adcb into staging Jun 10, 2026
5 checks passed
@vicsn vicsn deleted the copilot/bugfix-registered-versions branch June 10, 2026 09:50
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.

[Bug] version is registered multiple times

3 participants