diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10872d1..731226f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ "matrix": { "lisp": [ "sbcl-bin", - "ccl-bin/1.12.0" + "ccl-bin" ] } }, @@ -33,41 +33,15 @@ "steps": [ { "name": "Checkout Code", - "uses": "actions/checkout@v3" - }, - { - "name": "Grant All Perms to Make Cache Restoring Possible", - "run": "sudo mkdir -p /usr/local/etc/roswell\n sudo chown \"${USER}\" /usr/local/etc/roswell\n # Here the ros binary will be restored:\n sudo chown \"${USER}\" /usr/local/bin", - "shell": "bash" - }, - { - "name": "Get Current Month", - "id": "current-month", - "run": "echo \"value=$(date -u \"+%Y-%m\")\" >> $GITHUB_OUTPUT", - "shell": "bash" - }, - { - "name": "Cache Roswell Setup", - "id": "cache", - "uses": "actions/cache@v3", - "with": { - "path": "qlfile\nqlfile.lock\n~/.cache/common-lisp/\n~/.roswell\n/usr/local/etc/roswell\n/usr/local/bin/ros\n/usr/local/Cellar/roswell\n.qlot", - "key": "a-${{ steps.current-month.outputs.value }}-${{ env.cache-name }}-ubuntu-latest-quicklisp-${{ matrix.lisp }}-${{ hashFiles('qlfile.lock', '*.asd') }}" - } - }, - { - "name": "Restore Path To Cached Files", - "run": "echo $HOME/.roswell/bin >> $GITHUB_PATH\n echo .qlot/bin >> $GITHUB_PATH", - "shell": "bash", - "if": "steps.cache.outputs.cache-hit == 'true'" + "uses": "actions/checkout@v4" }, { "name": "Setup Common Lisp Environment", - "uses": "40ants/setup-lisp@v2", + "uses": "40ants/setup-lisp@v4", "with": { - "asdf-system": "40ants-project-templates" - }, - "if": "steps.cache.outputs.cache-hit != 'true'" + "asdf-system": "40ants-project-templates", + "cache": "true" + } }, { "name": "Run Tests", diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index cb08a18..626ee20 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,41 +24,15 @@ "steps": [ { "name": "Checkout Code", - "uses": "actions/checkout@v3" - }, - { - "name": "Grant All Perms to Make Cache Restoring Possible", - "run": "sudo mkdir -p /usr/local/etc/roswell\n sudo chown \"${USER}\" /usr/local/etc/roswell\n # Here the ros binary will be restored:\n sudo chown \"${USER}\" /usr/local/bin", - "shell": "bash" - }, - { - "name": "Get Current Month", - "id": "current-month", - "run": "echo \"value=$(date -u \"+%Y-%m\")\" >> $GITHUB_OUTPUT", - "shell": "bash" - }, - { - "name": "Cache Roswell Setup", - "id": "cache", - "uses": "actions/cache@v3", - "with": { - "path": "qlfile\nqlfile.lock\n~/.cache/common-lisp/\n~/.roswell\n/usr/local/etc/roswell\n/usr/local/bin/ros\n/usr/local/Cellar/roswell\n.qlot", - "key": "a-${{ steps.current-month.outputs.value }}-${{ env.cache-name }}-ubuntu-latest-quicklisp-sbcl-bin-${{ hashFiles('qlfile.lock', '*.asd') }}" - } - }, - { - "name": "Restore Path To Cached Files", - "run": "echo $HOME/.roswell/bin >> $GITHUB_PATH\n echo .qlot/bin >> $GITHUB_PATH", - "shell": "bash", - "if": "steps.cache.outputs.cache-hit == 'true'" + "uses": "actions/checkout@v4" }, { "name": "Setup Common Lisp Environment", - "uses": "40ants/setup-lisp@v2", + "uses": "40ants/setup-lisp@v4", "with": { - "asdf-system": "40ants-project-templates-docs" - }, - "if": "steps.cache.outputs.cache-hit != 'true'" + "asdf-system": "40ants-project-templates-docs", + "cache": "true" + } }, { "name": "Build Docs", diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index f25fe95..b26919e 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -24,41 +24,15 @@ "steps": [ { "name": "Checkout Code", - "uses": "actions/checkout@v3" - }, - { - "name": "Grant All Perms to Make Cache Restoring Possible", - "run": "sudo mkdir -p /usr/local/etc/roswell\n sudo chown \"${USER}\" /usr/local/etc/roswell\n # Here the ros binary will be restored:\n sudo chown \"${USER}\" /usr/local/bin", - "shell": "bash" - }, - { - "name": "Get Current Month", - "id": "current-month", - "run": "echo \"value=$(date -u \"+%Y-%m\")\" >> $GITHUB_OUTPUT", - "shell": "bash" - }, - { - "name": "Cache Roswell Setup", - "id": "cache", - "uses": "actions/cache@v3", - "with": { - "path": "qlfile\nqlfile.lock\n~/.cache/common-lisp/\n~/.roswell\n/usr/local/etc/roswell\n/usr/local/bin/ros\n/usr/local/Cellar/roswell\n.qlot", - "key": "a-${{ steps.current-month.outputs.value }}-${{ env.cache-name }}-ubuntu-latest-quicklisp-sbcl-bin-${{ hashFiles('qlfile.lock', '*.asd') }}" - } - }, - { - "name": "Restore Path To Cached Files", - "run": "echo $HOME/.roswell/bin >> $GITHUB_PATH\n echo .qlot/bin >> $GITHUB_PATH", - "shell": "bash", - "if": "steps.cache.outputs.cache-hit == 'true'" + "uses": "actions/checkout@v4" }, { "name": "Setup Common Lisp Environment", - "uses": "40ants/setup-lisp@v2", + "uses": "40ants/setup-lisp@v4", "with": { - "asdf-system": "40ants-project-templates" - }, - "if": "steps.cache.outputs.cache-hit != 'true'" + "asdf-system": "40ants-project-templates", + "cache": "true" + } }, { "name": "Change dist to Ultralisp if qlfile does not exist", diff --git a/docs/changelog.lisp b/docs/changelog.lisp index e2401a3..221c8e4 100644 --- a/docs/changelog.lisp +++ b/docs/changelog.lisp @@ -11,6 +11,8 @@ "API" "JSON-RPC" "HTTP")) + (0.4.0 2024-05-18 + "* Update dependencies. Renamed asd files to prevent qlot from trying to process dependencies from these files.") (0.3.0 2023-05-06 "* Add API section into the docs. * Add dependency on `clack-handler-hunchentoot` system.") diff --git a/qlfile.lock b/qlfile.lock index 10c87ed..b70d670 100644 --- a/qlfile.lock +++ b/qlfile.lock @@ -1,11 +1,11 @@ ("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 "20240517095000")) ("slynk" . (:class qlot/source/github:source-github :initargs (:repos "svetlyak40wt/sly" :ref nil :branch "patches" :tag nil) diff --git a/src/ci.lisp b/src/ci.lisp index 3962cbc..dd4d6c1 100644 --- a/src/ci.lisp +++ b/src/ci.lisp @@ -36,7 +36,5 @@ :jobs ((run-tests :asdf-system "40ants-project-templates" :lisp ("sbcl-bin" - ;; Issue https://github.com/roswell/roswell/issues/534 - ;; is still reproduces on 2023-02-06: - "ccl-bin/1.12.0") + "ccl-bin") :coverage t))) diff --git a/src/jsonrpc-app.lisp b/src/jsonrpc-app.lisp index 089ec7b..40b91c4 100644 --- a/src/jsonrpc-app.lisp +++ b/src/jsonrpc-app.lisp @@ -40,7 +40,7 @@ (make-pathname :directory '(:relative "templates" "jsonrpc-app")) - :renames '(("system.asd" . "{{ name }}.asd") + :renames '(("system.asd.template" . "{{ name }}.asd") ("roswell/app.ros" . "roswell/{{ name }}.ros"))) args)))) (apply #'call-next-method template new-args))) diff --git a/src/library.lisp b/src/library.lisp index 1cdd06b..920bdb2 100644 --- a/src/library.lisp +++ b/src/library.lisp @@ -86,7 +86,7 @@ Use 40ANTS-PROJECT-TEMPLATES:CREATE-LIBRARY function to generate a skeleton for (:documentation "Should return a file object, which creates `{{ name }}.asd` file.") (:method ((template library-template)) (make-file :40ants-project-templates - "library/system.asd" + "library/system.asd.template" "{{ name }}.asd"))) diff --git a/src/mixin/ci.lisp b/src/mixin/ci.lisp index dcd9aca..f150f99 100644 --- a/src/mixin/ci.lisp +++ b/src/mixin/ci.lisp @@ -19,7 +19,7 @@ (setf (slot-value self 'files) (list* (make-file :40ants-project-templates - "mixin/ci/system.asd" + "mixin/ci/system.asd.template" "{{ name }}-ci.asd") (make-file :40ants-project-templates "mixin/ci/ci.lisp" diff --git a/src/mixin/docs.lisp b/src/mixin/docs.lisp index 7a5cd36..cb7e7c8 100644 --- a/src/mixin/docs.lisp +++ b/src/mixin/docs.lisp @@ -37,7 +37,7 @@ "mixin/docs/empty.md" "ChangeLog.md") (make-file :40ants-project-templates - "mixin/docs/system.asd" + "mixin/docs/system.asd.template" "{{ name }}-docs.asd") (make-file :40ants-project-templates "mixin/docs/index.lisp" diff --git a/src/mixin/rove-tests.lisp b/src/mixin/rove-tests.lisp index 04cbf8d..4058700 100644 --- a/src/mixin/rove-tests.lisp +++ b/src/mixin/rove-tests.lisp @@ -19,7 +19,7 @@ (setf (slot-value self 'files) (list* (make-file :40ants-project-templates - "mixin/rove-tests/system.asd" + "mixin/rove-tests/system.asd.template" "{{ name }}-tests.asd") (make-file :40ants-project-templates "mixin/rove-tests/core.lisp" diff --git a/src/reblocks-app.lisp b/src/reblocks-app.lisp index 7c5b844..e5d2827 100644 --- a/src/reblocks-app.lisp +++ b/src/reblocks-app.lisp @@ -35,7 +35,7 @@ (make-pathname :directory '(:relative "templates" "reblocks-app")) - :renames '(("system.asd" . "{{ name }}.asd"))) + :renames '(("system.asd.template" . "{{ name }}.asd"))) args)))) (apply #'call-next-method template new-args))) diff --git a/t/core.lisp b/t/core.lisp index fe88244..fb1b3b8 100644 --- a/t/core.lisp +++ b/t/core.lisp @@ -4,22 +4,26 @@ (:import-from #:rove #:deftest #:ok) - (:import-from #:docs-builder)) + (:import-from #:docs-builder) + (:import-from #:alexandria + #:once-only + #:with-gensyms)) (in-package #:40ants-project-templates-tests/core) (defmacro with-temp-path ((lib-name tmp-path-var) &body body) - (alexandria:once-only (lib-name) - `(let ((,tmp-path-var (uiop:ensure-directory-pathname - (uiop:tmpize-pathname - (make-pathname :name ,lib-name - :directory '(:absolute "tmp")))))) - (uiop:delete-file-if-exists ,tmp-path-var) - - (unwind-protect - (progn ,@body) - (when (probe-file ,tmp-path-var) - (uiop:delete-directory-tree ,tmp-path-var :validate t)))))) + (with-gensyms (temp-file) + (once-only (lib-name) + `(let* ((,temp-file (uiop:tmpize-pathname + (make-pathname :name ,lib-name + :directory '(:absolute "tmp")))) + (,tmp-path-var (uiop:ensure-directory-pathname ,temp-file))) + (uiop:delete-file-if-exists ,temp-file) + + (unwind-protect + (progn ,@body) + (when (probe-file ,tmp-path-var) + (uiop:delete-directory-tree ,tmp-path-var :validate t))))))) (deftest test-a-library-has-docs @@ -44,7 +48,16 @@ (let* ((asdf:*central-registry* (cons tmp-path asdf:*central-registry*)) (resulting-path (progn (asdf:load-system docs-system-name) - (docs-builder:build docs-system-name))) + (handler-bind ((docs-builder:documentation-has-problems + ;; Here we ignore documentation warnings + ;; because on CCL we have some problems with them: + #+ccl + #'continue + ;; But for other implementations + ;; will require for no warnings: + #-ccl + #'identity)) + (docs-builder:build docs-system-name)))) (index.html (merge-pathnames (make-pathname :name "index" :type "html") diff --git a/templates/jsonrpc-app/system.asd b/templates/jsonrpc-app/system.asd.template similarity index 100% rename from templates/jsonrpc-app/system.asd rename to templates/jsonrpc-app/system.asd.template diff --git a/templates/library/system.asd b/templates/library/system.asd.template similarity index 100% rename from templates/library/system.asd rename to templates/library/system.asd.template diff --git a/templates/mixin/ci/system.asd b/templates/mixin/ci/system.asd.template similarity index 100% rename from templates/mixin/ci/system.asd rename to templates/mixin/ci/system.asd.template diff --git a/templates/mixin/docs/system.asd b/templates/mixin/docs/system.asd.template similarity index 100% rename from templates/mixin/docs/system.asd rename to templates/mixin/docs/system.asd.template diff --git a/templates/mixin/rove-tests/system.asd b/templates/mixin/rove-tests/system.asd.template similarity index 100% rename from templates/mixin/rove-tests/system.asd rename to templates/mixin/rove-tests/system.asd.template diff --git a/templates/reblocks-app/system.asd b/templates/reblocks-app/system.asd.template similarity index 100% rename from templates/reblocks-app/system.asd rename to templates/reblocks-app/system.asd.template