changelog shortlog graph tags branches files raw help

Mercurial > core / changeset: lazy updates

changeset 390: 88a6edf5291b
parent 389: 95b861dff3d8
child 391: 757b91ddcb2a
author: Richard Westhaver <ellis@rwest.io>
date: Sat, 01 Jun 2024 00:39:01 -0400
files: lisp/lib/vc/pkg.lisp lisp/lib/vc/tests.lisp lisp/std/pkg.lisp skelfile x.lisp
description: lazy updates
     1.1--- a/lisp/lib/vc/pkg.lisp	Fri May 31 23:28:35 2024 -0400
     1.2+++ b/lisp/lib/vc/pkg.lisp	Sat Jun 01 00:39:01 2024 -0400
     1.3@@ -2,7 +2,8 @@
     1.4   (:use :cl :std :log :obj :cl-ppcre :parse/lex)
     1.5   (:import-from :uiop :with-current-directory)
     1.6   (:export 
     1.7-   :vc-error  :vc-status
     1.8+   :vc-repo
     1.9+   :vc-error :vc-status
    1.10    :vc-clone :vc-push :vc-pull :vc-commit
    1.11    :vc-init :vc-id :vc-add :vc-remove
    1.12    :vc-addremove :vc-diff
     2.1--- a/lisp/lib/vc/tests.lisp	Fri May 31 23:28:35 2024 -0400
     2.2+++ b/lisp/lib/vc/tests.lisp	Sat Jun 01 00:39:01 2024 -0400
     2.3@@ -1,11 +1,12 @@
     2.4 (defpackage :vc/tests
     2.5-  (:use :cl :std :rt :vc/proto :vc/git :vc/hg))
     2.6+  (:use :cl :std :rt :vc/proto :vc/git :vc/hg :vc))
     2.7 
     2.8 (in-package :vc/tests)
     2.9 (defsuite :vc)
    2.10 (in-suite :vc)
    2.11-(eval-always
    2.12-(defmacro with-temp-repo (kind &body body)
    2.13+
    2.14+(defmacro with-temp-repo ((kind &rest opts) &body body)
    2.15+  (declare (ignore opts)) ;; TODO 2024-06-01: 
    2.16   `(let ((repo ,(make-repo ".")))
    2.17      (setf (vc-repo-path repo) (merge-pathnames (format nil "~A" (gensym "repo")) "/tmp/"))
    2.18      (case ,kind
    2.19@@ -13,16 +14,24 @@
    2.20        (:git (sb-mop::change-class repo 'git-repo))
    2.21        (t nil))
    2.22      (vc-init repo)
    2.23-     (let ((*default-pathname-defaults* (vc::vc-repo-path repo)))
    2.24-       ,@body))))
    2.25+     (let ((*default-pathname-defaults* (vc-repo-path repo)))
    2.26+       ,@body)))
    2.27 
    2.28 (deftest git ()
    2.29-  (with-temp-repo :git
    2.30+  (with-temp-repo (:git)
    2.31     (is (streamp (sb-ext:process-output (run-git-command "status" nil :stream))))))
    2.32 
    2.33 (deftest hg ()
    2.34-  (with-temp-repo :hg
    2.35+  (with-temp-repo (:hg)
    2.36     (is (streamp (sb-ext:process-output (run-hg-command "status" nil :stream))))))
    2.37 
    2.38 (deftest vc ()
    2.39-  (with-temp-repo vc::*default-vc-kind* (is repo)))
    2.40+  (with-temp-repo (*default-vc-kind*) (is repo)))
    2.41+
    2.42+(defun %mirror-update (path) (declare (ignore path)))
    2.43+
    2.44+(deftest mirror-network (:disabled t)
    2.45+  (macrolet ((with-job ((job &rest opts) &body body)
    2.46+               `(let (()) ,@body)))
    2.47+    (labels ((%m (name thunk args)))
    2.48+      (%m "test" #'vc-pull nil))))
     3.1--- a/lisp/std/pkg.lisp	Fri May 31 23:28:35 2024 -0400
     3.2+++ b/lisp/std/pkg.lisp	Sat Jun 01 00:39:01 2024 -0400
     3.3@@ -3,15 +3,14 @@
     3.4 ;;
     3.5 
     3.6 ;;; Code:
     3.7-(pushnew :std *features*)
     3.8 (defpackage :std-user
     3.9-  (:use :cl :std)
    3.10+  (:use :cl :std/named-readtables)
    3.11   (:shadowing-import-from :std/defpkg :defpkg :define-lisp-package)
    3.12   (:export :defpkg :define-lisp-package))
    3.13+(in-package :std-user)
    3.14+(pushnew :std *features*)
    3.15 
    3.16-(in-package :std-user)
    3.17-
    3.18-(defpkg :std/err
    3.19+(defpackage :std/err
    3.20   (:use :cl)
    3.21   (:export    ;; err
    3.22    :std-error :std-error-message
    3.23@@ -39,7 +38,7 @@
    3.24    :invalid-argument-p
    3.25    :unwind-protect-case))
    3.26 
    3.27-(defpkg :std/sym
    3.28+(defpackage :std/sym
    3.29   (:use :cl)
    3.30   (:shadowing-import-from :sb-int
    3.31    :with-unique-names :symbolicate :package-symbolicate :keywordicate :gensymify*
     4.1--- a/skelfile	Fri May 31 23:28:35 2024 -0400
     4.2+++ b/skelfile	Sat Jun 01 00:39:01 2024 -0400
     4.3@@ -38,6 +38,7 @@
     4.4  (compile (x) #$./x compile$#)
     4.5  (std (x) #$./x save std$#)
     4.6  (prelude (x) #$./x save prelude$#)
     4.7+ (prelude (x) #$./x save user$#)
     4.8  (box () #$podman build . --build-arg IMAGE=box -t core$#)
     4.9  ;; x does the same thing, but prompts for sudo -- having issues with
    4.10  ;; passing the shell input to SKEL though.
    4.11@@ -54,4 +55,4 @@
    4.12           do echo "$(basename $f) -> $d"
    4.13           install -C -m 755 $f $d
    4.14           done fi$#)
    4.15- (deploy (std prelude) #$mv -v .stash/{prelude.core,std.core} $PACKY_DIR$#))
    4.16+ (deploy (std prelude user) #$mv -v .stash/{prelude.core,std.core} $PACKY_DIR$#))
     5.1--- a/x.lisp	Fri May 31 23:28:35 2024 -0400
     5.2+++ b/x.lisp	Sat Jun 01 00:39:01 2024 -0400
     5.3@@ -49,7 +49,7 @@
     5.4 (defvar *ffi-path* (merge-pathnames "ffi/" *lisp-path*))
     5.5 (defvar *stash-path* (merge-pathnames ".stash/" *core-path*))
     5.6 
     5.7-(defvar *compression-level* t)
     5.8+(defvar *compression-level* nil)
     5.9 
    5.10 (push *core-path* asdf:*central-registry*)
    5.11 (push *lisp-path* ql:*local-project-directories*)
    5.12@@ -88,14 +88,21 @@
    5.13 (defun compile-prelude (&optional force save)
    5.14   ;; (compile-std)
    5.15   (asdf:compile-system :prelude :force force)
    5.16+  (asdf:load-system :prelude :force force)
    5.17   ;; (rocksdb:load-rocksdb save)
    5.18   (when save (sb-ext:save-lisp-and-die (merge-pathnames "prelude.core" *stash-path*) :compression *compression-level*)))
    5.19 
    5.20+(defun compile-user (&optional force save)
    5.21+  (asdf:compile-system :user :force force)
    5.22+  (asdf:load-system :user :force force)
    5.23+  (when save (sb-ext:save-lisp-and-die (merge-pathnames "user.core" *stash-path*) :compression *compression-level*)))
    5.24+
    5.25 (defun save-foreign (name exports &rest args)
    5.26   (apply #'sb-ext:save-lisp-and-die name (append `(:executable nil :callable-exports ,exports) args)))
    5.27 
    5.28 (sb-alien:define-alien-callable compile-prelude sb-alien:void () (compile-prelude))
    5.29 (sb-alien:define-alien-callable compile-std sb-alien:void () (compile-std))
    5.30+(sb-alien:define-alien-callable compile-user sb-alien:void () (compile-user))
    5.31 
    5.32 (defvar *thunk* nil)
    5.33 
    5.34@@ -177,7 +184,8 @@
    5.35         (format t "saving core to: ~A~%" (merge-pathnames name *stash-path*))
    5.36         (string-case (name)
    5.37           ("prelude" (compile-prelude t t))
    5.38-          ("std" (compile-std t t))))
    5.39+          ("std" (compile-std t t))
    5.40+          ("user" (compile-user t t))))
    5.41       ;; self save
    5.42       (sb-ext:run-program "x.lisp" nil :input t :output t)))
    5.43