diff --git a/ChangeLog.rst b/ChangeLog.rst index 2a1efe7..0a26cba 100644 --- a/ChangeLog.rst +++ b/ChangeLog.rst @@ -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) ================== diff --git a/README.rst b/README.rst index bb8255b..c071aa9 100644 --- a/README.rst +++ b/README.rst @@ -18,35 +18,35 @@ 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 - QL: ceramic github-e0d905187946f8f2358f7b05e1ce87b302e34312 - cl-prevalence github-c163c227ed85d430b82cb1e3502f72d4f88e3cfa - log4cl-json github-c4f786e252d89a45372186aaf32fb8e8736b444b - log4cl github-6a857b0b41c030a8a3b04096205e221baaa1755f - quicklisp 2018-04-30 - slynk github-3314cf8c3021cb758e0e30fe3ece54accf1dcf3d - weblocks-lass github-1b043afbf2f3e84e495dfeae5e63fe67a435019f - weblocks-parenscript github-8ef4ca2f837403a05c4e9b92dcf1c41771d16f17 - weblocks-ui github-5afdf238534d70edc2447d0bc8bc63da8e35999f - weblocks-websocket github-b098db7f179dce3bfb045afd4e35e7cc868893f0 - weblocks github-282483f97d6ca351265ebfebb017867c295d01ad - websocket-driver github-a3046b11dfb9803ac3bff7734dd017390c2b54bb + QL: ceramic github-e0d905187946f8f2358f7b05e1ce87b302e34312 + cl-prevalence github-c163c227ed85d430b82cb1e3502f72d4f88e3cfa + log4cl-json github-c4f786e252d89a45372186aaf32fb8e8736b444b + log4cl github-6a857b0b41c030a8a3b04096205e221baaa1755f + quicklisp 2018-04-30 + slynk github-3314cf8c3021cb758e0e30fe3ece54accf1dcf3d + weblocks-lass github-1b043afbf2f3e84e495dfeae5e63fe67a435019f + weblocks-parenscript github-8ef4ca2f837403a05c4e9b92dcf1c41771d16f17 + weblocks-ui github-5afdf238534d70edc2447d0bc8bc63da8e35999f + weblocks-websocket github-b098db7f179dce3bfb045afd4e35e7cc868893f0 + weblocks github-282483f97d6ca351265ebfebb017867c295d01ad + websocket-driver github-a3046b11dfb9803ac3bff7734dd017390c2b54bb CL-USER> 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/ @@ -70,14 +70,14 @@ Here how to do it: OS: Darwin 15.6.0 Lisp: Clozure Common Lisp Version 1.11.5/v1.11.5 (DarwinX8664) ASDF: 3.3.1.1 - QL: org.borodust.bodge 20180214223017 - quicklisp 2017-10-23 + QL: org.borodust.bodge 20180214223017 + quicklisp 2017-10-23 System: weblocks 0.31.1 - /Users/art/common-lisp/weblocks/src/ + /Users/art/common-lisp/weblocks/src/ System: clack 2.0.0 - /Users/art/common-lisp/clack/ + /Users/art/common-lisp/clack/ System: jonathan 0.1 - /Users/art/.roswell/lisp/quicklisp/dists/quicklisp/software/jonathan-20170630-git/ + /Users/art/.roswell/lisp/quicklisp/dists/quicklisp/software/jonathan-20170630-git/ System: some-other-system is not available diff --git a/roswell/cl-info.ros b/roswell/cl-info.ros index b065fb2..48b31fe 100755 --- a/roswell/cl-info.ros +++ b/roswell/cl-info.ros @@ -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: diff --git a/src/core.lisp b/src/core.lisp index 7da1466..a2fb2c1 100644 --- a/src/core.lisp +++ b/src/core.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" @@ -73,18 +85,19 @@ QL: ~{~A~^~%~} (get-name info)) (format stream "System: ~A ~A - ~A + ~A " (get-name info) (get-version info) (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)))) - - diff --git a/version.lisp-expr b/version.lisp-expr index d8d63c2..797d18b 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -1 +1 @@ -"0.3.0" \ No newline at end of file +"0.4.0" \ No newline at end of file