Finding a Place in the (Version) Universe, Part 2
When we left off last time , we’d assembled a definition of what versions are. Now, we’re going to dive into how we use them in Tag1 Quo : comparing them to one another! The general goal is straightforward enough: we want to know if, say, 6.x-1.0 is less than 6.x-1.1 . (Yup!) Or if 6.x-1.0-alpha1 is less than 6.x-1.0 . (Also yup!) Let’s rewrite these two examples as tuple comparisons: {6,1,0,4,0,0} < {6,1,1,4,0,0} = TRUE {6,1,0,0,0,0} < {6,1,1,0,0,0} = TRUE To determine if one tuple is less than the other, we proceed pairwise through the tuple’s values, comparing the integers at the same position from each, until we find different values. Whichever tuple’s value at that position is less is considered to be the lesser version. (Uniformity in this comparison operation is why the mapping for prerelease types assigns unstable to 0, rather than 4.) However, this simple comparison operation doesn’t actually meet Quo’s requirements. Remember, Quo’s crucial question is not whether there are any newer versions, but whether there are newer security releases that are likely to apply to the version we’re investigating. So, say we’re looking at 6.x-1.1 for a given extension, and there exists a 7.x-2.2... Read more
sam
Tue, 10/25/2016 - 09:33