Now cl-info is able to work without Quicklisp client.
Also: * make-cl-info was renamed to get-cl-info. * make-system-info was renamed to get-system-info.
This commit is contained in:
parent
ec68cbb024
commit
5b48e49e37
5 changed files with 55 additions and 34 deletions
|
@ -2,6 +2,16 @@
|
|||
ChangeLog
|
||||
===========
|
||||
|
||||
0.4.0 (2019-07-19)
|
||||
==================
|
||||
|
||||
Now cl-info is able to work without Quicklisp client.
|
||||
|
||||
Also:
|
||||
|
||||
* ``make-cl-info`` was renamed to ``get-cl-info``.
|
||||
* ``make-system-info`` was renamed to ``get-system-info``.
|
||||
|
||||
0.3.0 (2018-06-17)
|
||||
==================
|
||||
|
||||
|
|
|
@ -18,13 +18,13 @@ Lisp environment.
|
|||
Usage from Common Lisp
|
||||
======================
|
||||
|
||||
It's main call is ``(cl-info:make-cl-info)``, it returns an object with
|
||||
It's main call is ``(cl-info:get-cl-info)``, it returns an object with
|
||||
customized ``print-object`` method. You can use it to output debug
|
||||
information in your programs:
|
||||
|
||||
.. code:: common-lisp
|
||||
|
||||
CL-USER> (cl-info:make-cl-info)
|
||||
CL-USER> (cl-info:get-cl-info)
|
||||
OS: Darwin 15.6.0
|
||||
Lisp: SBCL 1.4.8
|
||||
ASDF: 3.3.1.1
|
||||
|
@ -46,7 +46,7 @@ Also, you can gather information about separate systems:
|
|||
|
||||
.. code:: common-lisp
|
||||
|
||||
CL-USER> (cl-info:make-system-info :hamcrest)
|
||||
CL-USER> (cl-info:get-system-info :hamcrest)
|
||||
System: HAMCREST 0.4.2
|
||||
/Users/art/common-lisp/cl-hamcrest/src/
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@ exec ros -Q -- $0 "$@"
|
|||
(defpackage :ros.script.cl-info
|
||||
(:use :cl)
|
||||
(:import-from #:cl-info/core
|
||||
#:make-cl-info
|
||||
#:make-system-info)
|
||||
#:get-cl-info
|
||||
#:get-system-info)
|
||||
(:import-from #:defmain
|
||||
#:defmain))
|
||||
(in-package :ros.script.cl-info)
|
||||
|
@ -30,9 +30,9 @@ exec ros -Q -- $0 "$@"
|
|||
(format t "Version: ~A~%" version)
|
||||
(uiop:quit 0)))
|
||||
|
||||
(princ (make-cl-info))
|
||||
(princ (get-cl-info))
|
||||
|
||||
(loop for system-name in system
|
||||
do (princ (make-system-info system-name))))
|
||||
do (princ (get-system-info system-name))))
|
||||
|
||||
;;; vim: set ft=lisp lisp:
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
#:get-software-type
|
||||
#:get-software-version
|
||||
#:get-ql-dists
|
||||
#:make-cl-info
|
||||
#:get-cl-info
|
||||
#:system-info
|
||||
#:get-name
|
||||
#:get-version
|
||||
#:get-path
|
||||
#:absent-p
|
||||
#:make-system-info))
|
||||
#:get-system-info))
|
||||
(in-package cl-info/core)
|
||||
|
||||
|
||||
|
@ -30,10 +30,16 @@
|
|||
:reader get-software-type)
|
||||
(software-version :initform (software-version)
|
||||
:reader get-software-version)
|
||||
#+quicklisp
|
||||
(ql-dists :initform (ql-dist:all-dists)
|
||||
:reader get-ql-dists)))
|
||||
|
||||
|
||||
#-quicklisp
|
||||
(defun get-ql-dists (obj)
|
||||
nil)
|
||||
|
||||
|
||||
(defclass system-info ()
|
||||
((name :initarg :name
|
||||
:reader get-name)
|
||||
|
@ -51,13 +57,19 @@
|
|||
"OS: ~A ~A
|
||||
Lisp: ~A ~A
|
||||
ASDF: ~A
|
||||
QL: ~{~A~^~%~}
|
||||
"
|
||||
(get-software-type info)
|
||||
(get-software-version info)
|
||||
(get-lisp-type info)
|
||||
(get-lisp-version info)
|
||||
(get-asdf-version info)
|
||||
(get-asdf-version info))
|
||||
#-quicklisp
|
||||
(format stream
|
||||
"QL: is not available~%")
|
||||
#+quicklisp
|
||||
(format stream
|
||||
"QL: ~{~A~^~%~}
|
||||
"
|
||||
(loop for dist in (get-ql-dists info)
|
||||
for idx upfrom 0
|
||||
collect (format nil "~:[~; ~]~A ~A"
|
||||
|
@ -80,11 +92,12 @@ QL: ~{~A~^~%~}
|
|||
(get-path info))))
|
||||
|
||||
|
||||
(defun make-cl-info ()
|
||||
(defun get-cl-info ()
|
||||
"Returns information about lisp implementation, asdf and quicklisp."
|
||||
(make-instance 'cl-info))
|
||||
|
||||
|
||||
(defun make-system-info (system-name)
|
||||
(defun get-system-info (system-name)
|
||||
(let ((system (block search-for-system
|
||||
(handler-bind ((asdf:missing-component
|
||||
(lambda (c)
|
||||
|
@ -106,5 +119,3 @@ QL: ~{~A~^~%~}
|
|||
:absent t
|
||||
:version nil
|
||||
:path nil))))
|
||||
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
"0.3.0"
|
||||
"0.4.0"
|
Loading…
Reference in a new issue