Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autobuilder now passes unknown arguments to the docs-builder:build function #11

Merged
merged 2 commits into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/docs/
/.qlot/
README
*.fasl
8 changes: 4 additions & 4 deletions qlfile.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
("quicklisp" .
(:class qlot/source/dist:source-dist
:initargs (:distribution "http://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest)
:version "2023-10-21"))
:initargs (:distribution "https://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest)
:version "2024-10-12"))
("ultralisp" .
(:class qlot/source/dist:source-dist
:initargs (:distribution "http://dist.ultralisp.org" :%version :latest)
:version "20240311030500"))
:initargs (:distribution "https://dist.ultralisp.org" :%version :latest)
:version "20241214033500"))
("sly" .
(:class qlot/source/github:source-github
:initargs (:repos "svetlyak40wt/sly" :ref nil :branch "patches" :tag nil)
Expand Down
3 changes: 2 additions & 1 deletion roswell/build-docs.ros
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros -Q -- $0 "$@"
DYNAMIC_SPACE_SIZE=${DYNAMIC_SPACE_SIZE:-1Gb}
exec ros dynamic-space-size=$DYNAMIC_SPACE_SIZE -Q -- $0 "$@"
|#
(progn ;;init forms
(ros:ensure-asdf)
Expand Down
18 changes: 15 additions & 3 deletions src/autobuilder.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
(:import-from #:fs-watcher)
(:import-from #:trivial-open-browser
#:open-browser)
(:import-from #:alexandria
#:remove-from-plistf)
(:export #:build
#:stop))
(in-package #:docs-autobuilder)
Expand Down Expand Up @@ -67,10 +69,17 @@
(subseq file 0 (length root))))))


(defun build (system &key in-thread port (interface "localhost"))
(defun build (system &rest rest-args
&key in-thread port (interface "localhost")
&allow-other-keys)
(when *server*
(error "Server already running."))

(remove-from-plistf rest-args
:in-thread
:port
:interface)

(let* ((system-path (asdf:system-relative-pathname system "./"))
(docs-path (handler-bind ((docs-builder:documentation-has-problems
(lambda (c)
Expand All @@ -88,7 +97,9 @@
:address interface)))
(url (format nil "http://~A:~A/"
interface port)))
(open-browser url)

(with-simple-restart (skip-opening-the-browser "Skip opening the browser")
(open-browser url))

(labels ((build-system (changed-file)
(cond
Expand All @@ -105,7 +116,8 @@
(handler-case
(progn
(ql:quickload system)
(docs-builder:build system))
(apply #'docs-builder:build system
rest-args))
(docs-builder:documentation-has-problems (c)
(log:error "Unable to build docs for ~A system. ~A"
system c))
Expand Down
5 changes: 5 additions & 0 deletions src/changelog.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@
(defchangelog (:ignore-words ("HTML"
"MGL-PAX"
"ASDF"
"DYNAMIC_SPACE_SIZE"
"1Gb"
"SBCL"
"ERROR-ON-WARNINGS"
"DYNAMIC-BINDINGS")
:external-docs ("https://40ants.com/doc/"))
(0.12.0 2024-12-14
"* Now `DYNAMIC_SPACE_SIZE` env variable can be used to control amount of memory available to SBCL, by default it is `1Gb`.")
(0.11.1 2024-03-11
"* Fixed initite loop when the system is unknown to ASDF yet.")
(0.11.0 2023-06-05
Expand Down
Loading