Changeset 33408 in project


Ignore:
Timestamp:
06/12/16 00:11:56 (3 years ago)
Author:
Mario Domenech Goulart
Message:

chicken-5-roadmap-egg-system (wiki): add section "Disallow version specification as numbers"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/chicken-5-roadmap-egg-system

    r33199 r33408  
    128128
    129129
     130=== Disallow version specification as numbers
     131
     132We should stop accepting versions as numbers, as they may cause confusion
     133in some cases.  For example:
     134
     135  Version 0.20 is read as 0.2, which is less than 0.19, according to the
     136  version comparators.  This can cause problems when chicken-install
     137  takes decisions based on version numbers.
     138 
     139  Although (> 0.20 0.19) => #t,  (version>=? 0.20 0.19) => #f.  However,
     140  (version>=? "0.20" "0.19") => #t.
     141 
     142  That's because versions are (read) by setup-api and tokenized using
     143  `.' as separators.  If versions are numbers, they are read as numbers
     144  then converted to strings, then parsed by the version API.  So, 0.20
     145  is read as 0.2, converted to "0.2" and tokenized as ("0" "2").  Then,
     146  converted back to numbers we have (0 2).  If we apply the same to
     147  0.19, we have (> 2 19) => #f.
     148 
     149  By using versions as strings, we have "0.20" read as a string,
     150  tokenized as ("0" "20") and converted back to numbers as (0 20).
     151  Thus, (> 20 19) => #t.
     152
     153From [[https://github.com/ckeen/pastiche/commit/862c1d7008342230dcd4a4109376dd381f956207|https://github.com/ckeen/pastiche/commit/862c1d7008342230dcd4a4109376dd381f956207]]
     154
     155
    130156=== More notes
    131157
Note: See TracChangeset for help on using the changeset viewer.