Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
Signed-off-by: Keran Yang <[email protected]>
  • Loading branch information
KeranYang committed Sep 20, 2024
1 parent db133a9 commit 4ee3353
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ pub(crate) const BATCH_MAP: &str = "batch-map";
// E.g., if the minimum version is 1.3.1, then put "1.3.1-z"
//
// Why "-z"?
// It's to support validating pre-releases like rc1, rc2 with the constraint.
// The semantic versioning library(https://github.com/Masterminds/semver) we use
// to evaluate the version constraint requires specifying a pre-release version in the constraint,
// to be able to compare with a pre-release version.
// It's to support validating pre-releases like rc1, rc2.
// A pre-release a.b.c-rc1 is considered smaller than a.b.c, but the semantic versioning library
// cannot validate a.b.c-rc1 against a constraint of ">= a.b.c".
// Instead, the library(https://github.com/Masterminds/semver) requires a pre-release version in the version constraint,
// to be able to validate a pre-release version.
// To translate the constraint of ">= a.b.c" into a pre-release one, we use ">=a.b.c-z",
// as `z` is relatively the largest character in the ASCII table.
// because `z` is relatively the largest character in the ASCII table.
// All the rc versions are considered smaller than `z`.
const MINIMUM_NUMAFLOW_VERSION: &str = "1.3.1-z";
const SDK_VERSION: &str = env!("CARGO_PKG_VERSION");

Expand Down

0 comments on commit 4ee3353

Please sign in to comment.