Skip to content

Commit

Permalink
Merge pull request #45 from 40ants/allow-to-change-asdf-system-title
Browse files Browse the repository at this point in the history
A generic-function 40ANTS-DOC/LOCATIVES/ASDF-SYSTEM:ASDF-SYSTEM-DOCUMENTATION-TITLE was added.
  • Loading branch information
svetlyak40wt authored May 4, 2024
2 parents 4bdd28d + 6661231 commit 374d069
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 44 deletions.
27 changes: 4 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,6 @@
"fail-fast": false,
"matrix": {
"exclude": [
{
"quicklisp": "quicklisp",
"lisp": "abcl-bin"
},
{
"quicklisp": "quicklisp",
"lisp": "clasp"
},
{
"quicklisp": "quicklisp",
"lisp": "lispworks"
},
{
"quicklisp": "quicklisp",
"lisp": "mkcl"
},
{
"quicklisp": "quicklisp",
"lisp": "ecl"
Expand All @@ -46,10 +30,6 @@
],
"lisp": [
"sbcl-bin",
"abcl-bin",
"clasp",
"lispworks",
"mkcl",
"ecl"
]
}
Expand All @@ -63,13 +43,14 @@
"steps": [
{
"name": "Checkout Code",
"uses": "actions/checkout@v3"
"uses": "actions/checkout@v4"
},
{
"name": "Setup Common Lisp Environment",
"uses": "40ants/setup-lisp@v3",
"uses": "40ants/setup-lisp@v4",
"with": {
"asdf-system": "40ants-doc-full"
"asdf-system": "40ants-doc-full",
"cache": "false"
}
},
{
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
"steps": [
{
"name": "Checkout Code",
"uses": "actions/checkout@v3"
"uses": "actions/checkout@v4"
},
{
"name": "Setup Common Lisp Environment",
"uses": "40ants/setup-lisp@v3",
"uses": "40ants/setup-lisp@v4",
"with": {
"asdf-system": "40ants-doc-full"
"asdf-system": "40ants-doc-full",
"cache": "false"
}
},
{
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
"steps": [
{
"name": "Checkout Code",
"uses": "actions/checkout@v3"
"uses": "actions/checkout@v4"
},
{
"name": "Setup Common Lisp Environment",
"uses": "40ants/setup-lisp@v3",
"uses": "40ants/setup-lisp@v4",
"with": {
"asdf-system": "40ants-doc"
"asdf-system": "40ants-doc",
"cache": "false"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"steps": [
{
"name": "Checkout Code",
"uses": "actions/checkout@v3"
"uses": "actions/checkout@v4"
},
{
"name": "Create release tag",
Expand Down
1 change: 1 addition & 0 deletions 40ants-doc.asd
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"40ants-doc/glossary"
"40ants-doc/changelog"
"40ants-doc/ignored-words"
"40ants-doc/locatives/asdf-system"
;; This subsystem is not loaded by default
;; because it brings a multiple additional dependencies:
;; alexandria, cl-change-case, cl-ppcre, cl-unicode, closer-mop.
Expand Down
4 changes: 4 additions & 0 deletions full/doc.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
#:locate-definition-for-emacs)
(:import-from #:40ants-doc/autodoc
#:defautodoc)
(:import-from #:40ants-doc/locatives/asdf-system
#:asdf-system-documentation-title)
(:export #:@index
#:@readme
#:@changelog))
Expand Down Expand Up @@ -582,6 +584,8 @@ See full list of changes in the 40ANTS-DOC/CHANGELOG::@CHANGELOG section.

(40ants-doc/locatives package)
(system locative)
(asdf-system-documentation-title generic-function)

(section locative)
(variable locative)
(constant locative)
Expand Down
14 changes: 9 additions & 5 deletions full/locatives/asdf-system.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,20 @@
(:import-from #:40ants-doc-full/commondoc/section
#:make-section-with-reference)
(:import-from #:40ants-doc-full/commondoc/builder
#:to-commondoc))
#:to-commondoc)
(:import-from #:40ants-doc/locatives/asdf-system
#:asdf-system-documentation-title))
(in-package #:40ants-doc-full/locatives/asdf-system)

(define-locative-type asdf:system ()
"Refers to an asdf system. The generated documentation will include
meta information extracted from the system definition. This also
serves as an example of a symbol that's not accessible in the
current package and consequently is not exported.")
current package and consequently is not exported.
A title of the documentation section can be modified if you'll
define a method for 40ANTS-DOC/LOCATIVES/ASDF-SYSTEM:ASDF-SYSTEM-DOCUMENTATION-TITLE generic-function.
Use EQL specifier for the method.")


(defun find-system (name)
Expand Down Expand Up @@ -59,9 +65,7 @@
(:snippet "")))

(defmethod to-commondoc ((system asdf:system))
(let ((title (format nil "~A ASDF System Details"
(string-upcase
(asdf:primary-system-name system)))))
(let ((title (asdf-system-documentation-title system)))
(flet ((item (name getter &key type)
(let* ((value (funcall getter system))
(href nil))
Expand Down
6 changes: 3 additions & 3 deletions qlfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
("quicklisp" .
(:class qlot/source/dist:source-dist
:initargs (:distribution "http://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest)
:initargs (:distribution "https://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest)
:version "2023-10-21"))
("ultralisp" .
(:class qlot/source/dist:source-dist
:initargs (:distribution "http://dist.ultralisp.org" :%version :latest)
:version "20240303155001"))
:initargs (:distribution "https://dist.ultralisp.org" :%version :latest)
:version "20240504100002"))
2 changes: 2 additions & 0 deletions src/changelog.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@
"CLEAN-URLS"
;; These objects are not documented yet:
"40ANTS-DOC/COMMONDOC/XREF:XREF"))
(0.16.0 2024-05-04
"* A generic-function 40ANTS-DOC/LOCATIVES/ASDF-SYSTEM:ASDF-SYSTEM-DOCUMENTATION-TITLE was added. It allows to override the text of a section showing an information about ASDF system.")
(0.15.4 2024-01-26
"* Another fix to URLs on the search page. Now if CLEAN-URLS argument is true, search page will link to the pages ended with a backslash. Otherwise, it will link to the html pages.")
(0.15.3 2024-01-24
Expand Down
21 changes: 15 additions & 6 deletions src/ci.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,25 @@
(defparameter *lisp-implementations*
(list "sbcl-bin"
;; Some tests fail on CCL
;; "ccl-bin/1.12.1"
"abcl-bin"
;; "ccl-bin"
;; CLISP is not supported by bordeaux-threads
;; but it is a transitive dependency
;; "clisp-head"
;; Some tests fail on ABCL
;; "abcl-bin"
;; At 2023-04-22 tests started to fail on Allegro with error:
;; Allegro CL(pid 6257): System Error (gsgc) scavenge found ref to cons outside cons area in 0xffba645c
;; "allegro"
"clasp"
;; This CL implementation does not work in any matrix combinations
;; CLASP ails with "Too many arguments for option DOCUMENTATION" error:
;; "clasp-bin"
;; CMU fails with "Redefining slot accessor CHUNK-CACHE-CHUNKS for structure type CHUNK-CACHE" error,
;; occured somewhere inside esrap library:
;; "cmu-bin"
"lispworks"
"mkcl"
;; Lispworks is not supported by setup-lisp action:
;; "lispworks"
;; MKCL has problems when setup-lisp tries to install it:
;; https://github.com/40ants/setup-lisp/issues/17
;; "mkcl"
;; This fails to install under the Roswell on Ubuntu
;; "npt"
"ecl") )
Expand Down
16 changes: 16 additions & 0 deletions src/locatives/asdf-system.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(uiop:define-package #:40ants-doc/locatives/asdf-system
(:use #:cl)
(:export #:asdf-system-documentation-title))
(in-package #:40ants-doc/locatives/asdf-system)


(defgeneric asdf-system-documentation-title (system)
(:documentation "Returns a title for a section describing an ASDF system.
You might want to define a method using EQL specializer
to make a title shorter or to remove a system name from it.")

(:method ((system asdf:system))
(format nil "~A ASDF System Details"
(string-upcase
(asdf:primary-system-name system)))))

0 comments on commit 374d069

Please sign in to comment.