Coverage report: /home/ellis/comp/core/app/packy/client.lisp
Kind | Covered | All | % |
expression | 0 | 48 | 0.0 |
branch | 0 | 6 | 0.0 |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
;;; packy/client.lisp --- Packy Client
3
;; Client-side API for Packy.
7
;; The client is responsible for fetching packages from a registry,
8
;; organizing packages, and making them available to the user.
13
(defstruct packy-client)
15
(defun pk-index (&optional (name "packs"))
16
(let ((url (obj/uri:merge-uris (concatenate 'string name ".json") *packy-url*)))
17
(with-input-from-string (s (req:get url))
18
(dat/json::json-read s nil))))
20
(defun init-packy (&key reset columns (tree-sitter t))
21
(ensure-directories-exist *packy-home*)
22
(when (and reset *packy-db*) (db:shutdown-db *packy-db* :wait t))
23
(unless *packy-db* (init-packy-db))
24
(unless (db:db-open-p *packy-db*)
25
(when (probe-file (name *packy-db*))
26
(rdb:load-opts *packy-db* :backfill :full))
28
(db:open-db *packy-db*)
30
(apply 'db:open-columns *packy-db* columns))))
32
(tree-sitter:load-tree-sitter)
33
(tree-sitter:load-tree-sitter-alien)
34
(tree-sitter:load-tree-sitter-bash)))