mozilla / morgothv1

Service that helps developers manage the deployment pipeline for System Add-ons.
Mozilla Public License 2.0
0 stars 8 forks source link

Stricter version comparisons #62

Open Osmose opened 7 years ago

Osmose commented 7 years ago

The current version comparison code compares versions by parsing each segment as an integer and adding them together, multiplying the numbers by a sufficiently large number to get integers that can be compared numerically. But that doesn't scale to very high versions numbers, although we don't expect to hit version numbers high enough to matter.

At some point we should probably implement a better comparison for versions that directly compares each segment rather than mathing them into integers.

bhearsum commented 7 years ago

Forgive the fly-by, but you may be interested in Balrog's version parsing/comparsion code here: https://github.com/mozilla/balrog/blob/master/auslib/util/versions.py