Fixed handling of ASDF/PLAN:SYSTEM-OUT-OF-DATE error, when displaying information about installed systems.
This commit is contained in:
parent
fe372b7ab5
commit
c942f5bdfb
4 changed files with 86 additions and 64 deletions
|
@ -2,6 +2,14 @@
|
|||
ChangeLog
|
||||
===========
|
||||
|
||||
0.3.0 (2018-06-17)
|
||||
==================
|
||||
|
||||
Fixed handling of ``ASDF/PLAN:SYSTEM-OUT-OF-DATE`` error, when
|
||||
displaying information about installed systems.
|
||||
|
||||
Added normal README with examples.
|
||||
|
||||
0.2.0 (2018-06-04)
|
||||
==================
|
||||
|
||||
|
|
117
README.rst
117
README.rst
|
@ -4,77 +4,82 @@
|
|||
|
||||
.. insert-your badges like that:
|
||||
|
||||
.. image:: https://travis-ci.org/40ants/cl-hamcrest.svg?branch=master
|
||||
:target: https://travis-ci.org/40ants/cl-hamcrest
|
||||
.. image:: https://travis-ci.org/40ants/cl-info.svg?branch=master
|
||||
:target: https://travis-ci.org/40ants/cl-info
|
||||
|
||||
.. Everything starting from this commit will be inserted into the
|
||||
index page of the HTML documentation.
|
||||
.. include-from
|
||||
|
||||
Give some introduction.
|
||||
|
||||
Reasoning
|
||||
=========
|
||||
This is a small utility, useful to display information about you Common
|
||||
Lisp environment.
|
||||
|
||||
Explain why this project so outstanding and why it
|
||||
was created.
|
||||
Usage from Common Lisp
|
||||
======================
|
||||
|
||||
You can give some examples. This is how common lisp
|
||||
code should be formatted:
|
||||
It's main call is ``(cl-info:make-cl-info)``, it returns an object with
|
||||
customized ``print-object`` method. You can use it to output debug
|
||||
information in your programs:
|
||||
|
||||
.. code-block:: common-lisp
|
||||
.. code:: common-lisp
|
||||
|
||||
(defvar log-item '(:|@message| "Some"
|
||||
:|@timestamp| 122434342
|
||||
;; this field is wrong and
|
||||
;; shouldn't be here
|
||||
:|@fields| nil))
|
||||
CL-USER> (cl-info:make-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
|
||||
CL-USER>
|
||||
|
||||
And this is how you can provide REPL examples:
|
||||
Also, you can gather information about separate systems:
|
||||
|
||||
.. code-block:: common-lisp-repl
|
||||
.. code:: common-lisp
|
||||
|
||||
TEST> (format nil "Blah minor: ~a"
|
||||
100500)
|
||||
"Blah minor: 100500"
|
||||
CL-USER> (cl-info:make-system-info :hamcrest)
|
||||
System: HAMCREST 0.4.2
|
||||
/Users/art/common-lisp/cl-hamcrest/src/
|
||||
|
||||
Roadmap
|
||||
=======
|
||||
|
||||
Provide a Roadmap.
|
||||
Usage from command-line
|
||||
=======================
|
||||
|
||||
Also, you can use ``cl-info`` as a command-line utility. It is useful to
|
||||
output information about common lisp environment running on CI server,
|
||||
for example.
|
||||
|
||||
Here how to do it:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
# Here we use a Roswell, to install utility
|
||||
[art@art-osx:~]% ros install 40ants/cl-info
|
||||
|
||||
# And now request information about lisp and some systems
|
||||
[art@art-osx:~]% cl-info weblocks clack jonathan some-other-system
|
||||
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
|
||||
System: weblocks 0.31.1
|
||||
/Users/art/common-lisp/weblocks/src/
|
||||
System: clack 2.0.0
|
||||
/Users/art/common-lisp/clack/
|
||||
System: jonathan 0.1
|
||||
/Users/art/.roswell/lisp/quicklisp/dists/quicklisp/software/jonathan-20170630-git/
|
||||
System: some-other-system is not available
|
||||
|
||||
|
||||
.. Everything after this comment will be omitted from HTML docs.
|
||||
.. include-to
|
||||
|
||||
Building Documentation
|
||||
======================
|
||||
|
||||
Provide instruction how to build or use your library.
|
||||
|
||||
How to build documentation
|
||||
--------------------------
|
||||
|
||||
To build documentation, you need a Sphinx. It is
|
||||
documentaion building tool written in Python.
|
||||
|
||||
To install it, you need a virtualenv. Read
|
||||
this instructions
|
||||
`how to install it
|
||||
<https://virtualenv.pypa.io/en/stable/installation/#installation>`_.
|
||||
|
||||
Also, you'll need a `cl-launch <http://www.cliki.net/CL-Launch>`_.
|
||||
It is used by documentation tool to run a script which extracts
|
||||
documentation strings from lisp systems.
|
||||
|
||||
Run these commands to build documentation::
|
||||
|
||||
virtualenv env
|
||||
source env/bin/activate
|
||||
pip install -r docs/requirements.txt
|
||||
invoke build_docs
|
||||
|
||||
These commands will create a virtual environment and
|
||||
install some python libraries there. Command ``invoke build_docs``
|
||||
will build documentation and upload it to the GitHub, by replacing
|
||||
the content of the ``gh-pages`` branch.
|
||||
|
||||
|
|
|
@ -85,17 +85,26 @@ QL: ~{~A~^~%~}
|
|||
|
||||
|
||||
(defun make-system-info (system-name)
|
||||
(let ((system (handler-case (asdf:find-system system-name)
|
||||
(asdf:missing-component () nil))))
|
||||
(let ((system (block search-for-system
|
||||
(handler-bind ((asdf:missing-component
|
||||
(lambda (c)
|
||||
(declare (ignorable c))
|
||||
(return-from search-for-system nil)))
|
||||
(asdf:system-out-of-date
|
||||
(lambda (c)
|
||||
(declare (ignorable c))
|
||||
(invoke-restart 'continue))))
|
||||
(asdf:find-system system-name)))))
|
||||
|
||||
(if system
|
||||
(make-instance 'system-info
|
||||
:name system-name
|
||||
:version (asdf:component-version system)
|
||||
:path (asdf:component-pathname system))
|
||||
(make-instance 'system-info
|
||||
:name system-name
|
||||
:absent t
|
||||
:version nil
|
||||
:path nil))))
|
||||
(make-instance 'system-info
|
||||
:name system-name
|
||||
:absent t
|
||||
:version nil
|
||||
:path nil))))
|
||||
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
"0.1.0"
|
||||
"0.3.0"
|
Loading…
Reference in a new issue