Coverage report: /home/ellis/comp/core/app/skel/skel.lisp

KindCoveredAll%
expression034 0.0
branch02 0.0
Key
Not instrumented
Conditionalized out
Executed
Not executed
 
Both branches taken
One branch taken
Neither branch taken
1
 ;;; skel.lisp --- Skel Top-level
2
 
3
 ;; Top-level commands for interacting with the SKEL system.
4
 
5
 ;;; Code:
6
 (pkg:defpkg :skel
7
   (:nicknames :sk)
8
   (:use :cl :std)
9
   (:use-reexport 
10
    :skel/core :skel/comp 
11
    :skel/net
12
    :skel/cli)
13
   (:export :with-project))
14
 
15
 (pkg:defpkg :sk-user
16
   (:use :cl :std :cli :clap :tools
17
    :cl-user :log :sb-debug :sb-ext
18
    :net/proto/dns :obj/ast :vc :rdb 
19
    :io :net :pod)
20
   (:import-from :uri :uri)
21
   (:use :skel :skel/core :skel/comp :skel/net))
22
 
23
 (in-package :skel)
24
 
25
 (pushnew :skel *features*)
26
 
27
 (progn
28
   (clap:defcmd skc-db ())
29
   (clap:defcmd skc-net ())
30
   (clap:defcmd skc-serve ())
31
   (clap:load-package-cli 
32
    *skel-cli*
33
    :cmds 
34
    ((:name db :description "interact with the skel database" :thunk skc-db)
35
     (:name net :description "communicate with skel clients and servers"
36
            :thunk skc-net))))
37
 
38
 ;; db is locked while skel is running, prevents multiple instances
39
 ;; #+rdb
40
 ;; (pushnew 'init-skel-logger *skel-init-hook*)
41
 ;; #+rdb
42
 ;; (pushnew 'sk-log-shutdown sb-ext:*exit-hooks*)
43
 
44
 (defvar *skel-init-keywords* '(:config *skel-user-config* 
45
                                :project *skel-project*
46
                                :cache *skel-cache*
47
                                :store *skel-store*
48
                                :stash *skel-stash*
49
                                :registry *skel-registry*
50
                                :cd *default-pathname-defaults*))
51
 
52
 (defun skel-keywordp (kw)
53
   (getf *skel-init-keywords* kw))
54
 
55
 (defun apply-skel-keywords (lst)
56
   ;; kludge
57
   (setf-skel-vars)
58
   (let ((kw))
59
     (loop with elt = (car lst)
60
           while (keywordp elt)
61
           do 
62
              (dotimes (i 2)
63
                (push (pop lst) kw)))
64
     (values kw lst)))
65
 
66
 (defmacro with-project (ctx &body body)
67
   `(let* ((*skel-project* ,(find-skelfile (or ctx *default-pathname-defaults*) :load t))
68
           (*default-pathname-defaults* (sk-src *skel-project*)))
69
      ,@body))