HotKeyIt / ahkdll

AutoHotkey_H
Mozilla Public License 2.0
271 stars 63 forks source link

Version numbers incorrect #35

Open Lexikos opened 2 years ago

Lexikos commented 2 years ago

For the v2.0-beta3-H002 release, A_AhkVersion is reporting 2.0-beta.1.

v2.0-beta3-H002 itself is incorrect; there must be a . between the pre-release identifier and the numeral. Without this dot, version number comparisons with other forks will yield incorrect results.

In other words, 2.0-beta3-H002 is (erroneously) greater than 2.0-beta.4, while 2.0-beta.3-H002 would (correctly) be greater than 2.0-beta.3 but less than 2.0-beta.4.

(That is presuming your version numbers are based on the main fork's version numbers, and are intended to be comparable.)

Lexikos commented 2 years ago

2.0-beta.3-H002 would (correctly) be greater than 2.0-beta.3

Actually, that's a mistake. Semantic Versioning says - indicates a pre-release version, so x-y is considered less than x. VerCompare and #Requires follow this rule.

I suppose this would prevent AutoHotkey_H v2.0-beta.3-H003 from running a script which contains #Requires AutoHotkey v2.0-beta.3.

What you should probably do is replace - with ., because x-y < x < x.y.