changelog shortlog graph tags branches files raw help

Mercurial > core / changeset: path fixes

changeset 568: 13a6c698a6dd
parent 567: 32995daa9a07
child 569: 0de98890711a
child 570: d1c75054df03
author: Richard Westhaver <ellis@rwest.io>
date: Mon, 29 Jul 2024 21:42:21 -0400
files: lisp/lib/cli/clap/cli.lisp lisp/lib/skel/core/obj.lisp skelfile
description: path fixes
     1.1--- a/lisp/lib/cli/clap/cli.lisp	Mon Jul 29 20:55:09 2024 -0400
     1.2+++ b/lisp/lib/cli/clap/cli.lisp	Mon Jul 29 21:42:21 2024 -0400
     1.3@@ -32,7 +32,7 @@
     1.4          "Run the top-level function and print to *STDOUT*."
     1.5          (with-cli-handlers
     1.6            (progn
     1.7-             ,@body (values))))
     1.8+             ,@body (terpri))))
     1.9        ,@(when export `((export ',main))))))
    1.10 
    1.11 ;; RESEARCH 2023-09-12: closed over hash-table with short/long flags
     2.1--- a/lisp/lib/skel/core/obj.lisp	Mon Jul 29 20:55:09 2024 -0400
     2.2+++ b/lisp/lib/skel/core/obj.lisp	Mon Jul 29 21:42:21 2024 -0400
     2.3@@ -148,8 +148,9 @@
     2.4 (defun bound-string-p (o s) (and (slot-boundp o s) (stringp (slot-value o s))))
     2.5 (defun sk-dir (o)
     2.6   (let ((str (directory-namestring (sk-path o))))
     2.7-    (unless (sb-sequence:emptyp str)
     2.8-      str)))
     2.9+    (if (sb-sequence:emptyp str)
    2.10+        *default-pathname-defaults*
    2.11+        str)))
    2.12 
    2.13 (defmethod load-ast ((self sk-config))
    2.14   ;; internal ast is never tagged
    2.15@@ -407,26 +408,30 @@
    2.16               (setf (slot-value self s) v))) ;; needs to be correct package
    2.17           ;;; SRC
    2.18           (if (bound-string-p self 'src)
    2.19-              (setf (sk-src self) (probe-file (sk-src self)))
    2.20+              (setf (sk-src self) (or (probe-file (sk-src self))
    2.21+                                      (probe-file (merge-pathnames (sk-src self) *skel-path*))
    2.22+                                      (error 'invalid-argument :reason "project source not found"
    2.23+                                                               :item (sk-src self))))
    2.24               (setf (sk-src self) (or (sk-dir self) *default-pathname-defaults*)))
    2.25-          (setq *skel-path* (sk-src self))
    2.26-          (when (bound-string-p self 'stash) (setf (sk-stash self) (pathname (the simple-string (sk-stash self)))))
    2.27-          (when (bound-string-p self 'store) (setf (sk-store self) (pathname (the simple-string (sk-store self)))))
    2.28+          (setq *skel-path* (or (sk-src self) *default-pathname-defaults*))
    2.29+          (let ((*default-pathname-defaults* (make-pathname :defaults (namestring *skel-path*))))
    2.30+            (when (bound-string-p self 'stash) (setf (sk-stash self) (pathname (the simple-string (sk-stash self)))))
    2.31+            (when (bound-string-p self 'store) (setf (sk-store self) (pathname (the simple-string (sk-store self)))))
    2.32           ;; INCLUDE
    2.33-          (when-let ((include (sk-include self)))
    2.34+            (when-let ((include (sk-include self)))
    2.35             (setf (sk-include self) (map 'vector
    2.36-                                         ;; recursively load included projects
    2.37-                                         (lambda (i) (load-ast
    2.38-                                                      (sk-read-file
    2.39-                                                       (make-instance 'sk-project)
    2.40-                                                       i)))
    2.41+                                           ;; recursively load included projects
    2.42+                                           (lambda (i) (load-ast
    2.43+                                                        (sk-read-file
    2.44+                                                         (make-instance 'sk-project)
    2.45+                                                         i)))
    2.46                                          include)))
    2.47           ;; COMPONENTS
    2.48-          (when (slot-boundp self 'components)
    2.49+            (when (slot-boundp self 'components)
    2.50             (setf (sk-components self) (map 'vector
    2.51                                             (lambda (c)
    2.52-                                              (sk-load-component (car c) (pathname (cadr c)) (namestring *skel-path*)))
    2.53-                                            (sk-components self))))
    2.54+                                              (sk-load-component (car c) (pathname (cadr c)) (namestring *default-pathname-defaults*)))
    2.55+                                            (sk-components self)))))
    2.56           ;; SCRIPTS
    2.57           (if (bound-string-p self 'scripts)
    2.58               (if-let* ((path (probe-file (pathname (the simple-string (sk-scripts self))))))
     3.1--- a/skelfile	Mon Jul 29 20:55:09 2024 -0400
     3.2+++ b/skelfile	Mon Jul 29 21:42:21 2024 -0400
     3.3@@ -43,15 +43,15 @@
     3.4                                        :output ".stash/alltypes_plain.parquet"))
     3.5  ;; lisp
     3.6  (%stash () #$mkdir -pv .stash$#)
     3.7- (rdb (%stash) (with-sbcl (:noinform t :quit t)
     3.8+ (build-rdb (%stash) (with-sbcl (:noinform t :quit t)
     3.9                  (ql:quickload :bin/rdb)
    3.10                  (asdf:make :bin/rdb))
    3.11       #$mv lisp/bin/rdb .stash/rdb$#)
    3.12- (skel (%stash) (with-sbcl (:noinform t :quit t)
    3.13+ (build-skel (%stash) (with-sbcl (:noinform t :quit t)
    3.14                   (ql:quickload :bin/skel)
    3.15                   (asdf:make :bin/skel))
    3.16        #$mv lisp/bin/skel .stash/skel$#)
    3.17- (skel-gui (%stash) (with-sbcl (:noinform t :quit t)
    3.18+ (build-skel-gui (%stash) (with-sbcl (:noinform t :quit t)
    3.19                       (push :tools *features*)
    3.20                       (ql:quickload :bin/skel)
    3.21                       (asdf:make :bin/skel))