Skip to content

[SemVer] Reflect.compare() is not specified to return exactly 1 or -1… - #682

Open
kLabz wants to merge 2 commits into
developmentfrom
fix/semver
Open

[SemVer] Reflect.compare() is not specified to return exactly 1 or -1…#682
kLabz wants to merge 2 commits into
developmentfrom
fix/semver

Conversation

@kLabz

@kLabz kLabz commented Dec 2, 2025

Copy link
Copy Markdown
Contributor

… (or 0)

Still need to update tests

@kLabz
kLabz marked this pull request as ready for review December 4, 2025 14:28
Comment thread test/tests/TestSemVer.hx
assertTrue(SemVer.ofString("0.1.1-beta.1") > SemVer.ofString("0.1.1-alpha.2"));
assertTrue(SemVer.ofString("0.1.1-rc.1") > SemVer.ofString("0.1.1-beta.1"));
#if !(server || haxelib_api)
assertTrue(SemVer.ofString("0.1.1-preview.1") > SemVer.ofString("0.1.1-rc.1"));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think the bug was specific to preview versions, on hashlink this was evaluating to false:

SemVer.ofString("1.2.2") < SemVer.ofString("1.2.4")

because the comparison returned -2

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.

2 participants