[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sbcl-commits
Subject:    [Sbcl-commits] master: Don't mismatch on fasl version for work-in-progress
From:       Douglas Katzman via Sbcl-commits <sbcl-commits () lists ! sourceforge ! net>
Date:       2020-09-29 4:05:05
Message-ID: 1601352305.304178.9520 () sfp-scm-1 ! v30 ! lw ! sourceforge ! com
[Download RAW message or body]

The branch "master" has been updated in SBCL:
       via  f8901f982a0e0f8e17b8a76ab0e68159c34b19d3 (commit)
      from  ea051c53a19134adf95bcfdd6ed9e7a34d5f7ddc (commit)

- Log -----------------------------------------------------------------
commit f8901f982a0e0f8e17b8a76ab0e68159c34b19d3
Author: Douglas Katzman <dougk@google.com>
Date:   Mon Sep 28 23:31:22 2020 -0400

    Don't mismatch on fasl version for work-in-progress
    
    During development you can install the SBCL that has uncomitted changes,
    commit them, rebuild, reload older contribs, etc without getting an error.
    Seeing the different version string is potentially useful to know what
    you've done, but failure to load a fasl per se could be a hindrance.
---
 generate-version.sh | 2 +-
 src/code/load.lisp  | 9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/generate-version.sh b/generate-version.sh
index 99ec6b1cb..db9c9ef43 100755
--- a/generate-version.sh
+++ b/generate-version.sh
@@ -63,7 +63,7 @@ if git diff HEAD --no-ext-diff --quiet --exit-code
 then
     version_dirty=""
 else
-    version_dirty="-dirty"
+    version_dirty="-WIP"
 fi
 # Now that we have all the pieces, put them together.
 cat >version.lisp-expr <<EOF
diff --git a/src/code/load.lisp b/src/code/load.lisp
index 7b1b5c225..536372e23 100644
--- a/src/code/load.lisp
+++ b/src/code/load.lisp
@@ -333,7 +333,12 @@
                       (result (make-string length)))
                  (read-string-as-bytes stream result)
                  (push result results)
-                 result)))
+                 result))
+             (unsuffix (s)
+               (if (and (> (length s) 4)
+                        (string= s "-WIP" :start1 (- (length s) 4)))
+                   (subseq s 0 (- (length s) 4))
+                   s)))
         ;; Read and validate implementation and version.
         (let ((implementation (string-from-stream))
               (expected-implementation +backend-fasl-file-implementation+))
@@ -351,7 +356,7 @@
                                  (string-from-stream)))
                (expected-version (lisp-implementation-version)))
           (push fasl-version results)
-          (unless (string= expected-version sbcl-version)
+          (unless (string= (unsuffix expected-version) (unsuffix sbcl-version))
             (restart-case
                 (error 'invalid-fasl-version
                        :stream stream

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL


_______________________________________________
Sbcl-commits mailing list
Sbcl-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic