From 0eb0834bbcccc553e8849b20ed4fdd0477482f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Mon, 24 Aug 2020 18:35:34 +0700 Subject: [PATCH] snow: accept "_" as version separator $ tools/snow-chibi implementations WARNING: Implementation gauche is an unsupported version, 0.9.10_pre1, but at least 0.9.4 is required. cyclone sagittarius The easy solution is also accept "_" as version separator and consider "pre1" the forth component. This makes the warning go away, and I don't think it'll affect version comparison on other schemes. --- lib/chibi/snow/utils.scm | 2 +- lib/chibi/snow/utils.sld | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/chibi/snow/utils.scm b/lib/chibi/snow/utils.scm index 7f437175..800bc5af 100644 --- a/lib/chibi/snow/utils.scm +++ b/lib/chibi/snow/utils.scm @@ -57,7 +57,7 @@ (define (version-split str) (if str (map (lambda (x) (or (string->number x) x)) - (string-split str #\.)) + (string-split str (string->char-set "._"))) '())) (define (version-compare a b) diff --git a/lib/chibi/snow/utils.sld b/lib/chibi/snow/utils.sld index be22a815..6ae87890 100644 --- a/lib/chibi/snow/utils.sld +++ b/lib/chibi/snow/utils.sld @@ -11,6 +11,7 @@ (scheme write) (scheme process-context) (srfi 1) + (chibi char-set) (chibi net http) (chibi pathname) (chibi string)