From 92c6a9db16d40b17efbecc96b07318739ecfeb8a Mon Sep 17 00:00:00 2001 From: Jan Moringen Date: Mon, 1 Jan 2024 12:51:27 +0100 Subject: [PATCH 1/4] Remove remnants of MAKE-TYPE and MAKE-CLASS --- Code/Test/tests.lisp | 6 +++--- README.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Code/Test/tests.lisp b/Code/Test/tests.lisp index 188febb..2c8b9f1 100644 --- a/Code/Test/tests.lisp +++ b/Code/Test/tests.lisp @@ -223,7 +223,7 @@ (is-false (sys:type-cell-boundp cli (sys:type-cell cli renv cname))))) -(test (make-class :fixture with-envs) +(test (find-class :fixture with-envs) (let ((cname (make-symbol "C")) (class (cl:find-class 'cons))) (finishes (setf (env:find-class cli renv cname) class)) @@ -235,12 +235,12 @@ (signals error (env:find-class cli renv cname)) (is (null (env:find-class cli renv cname nil))))) -(test (make-type :fixture with-envs) +(test (type-expander :fixture with-envs) (let ((tname (make-symbol "T")) (expander (lambda (specifier env) (declare (ignore specifier env)) '(or cons null)))) - (finishes (env:make-type cli renv tname expander)) + (finishes (setf (env:type-expander cli renv tname) expander)) (is (eql expander (env:type-expander cli renv tname))) (is (equal '(or cons null) (env:type-expand-1 cli renv tname))) (is (equal '(or cons null) (env:type-expand-1 cli renv `(,tname)))))) diff --git a/README.md b/README.md index e6c123f..6290900 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ The Clostrum API is divided into two parts, a "high level" package `clostrum`, a For operating on run-time environments, the `clostrum` package makes available environment manipulation functions and accessors similar to those in the standard: `fdefinition`, `fboundp`, `fmakunbound`, `macro-function`, `special-operator-p` for functions; `symbol-value`, `boundp`, `makunbound`, `symbol-plist` for variables; `find-class` for classes; `find-package` for packages; and `macroexpand-1`, `macroexpand`, and `constantp`. -There are additional functions and accessors corresponding to some other Lisp operators. `setf-expander` can be used for `define-setf-expander`; `make-variable`, `make-parameter`, `make-constant`, and `make-symbol-macro` for `defvar`, `defparameter`, `defconstant`, and `define-symbol-macro` respectively; and `make-type` and `type-expander` for `deftype`, along with `type-expand-1` and `type-expand` to work with type specifiers. +There are additional functions and accessors corresponding to some other Lisp operators. `setf-expander` can be used for `define-setf-expander`; `make-variable`, `make-parameter`, `make-constant`, and `make-symbol-macro` for `defvar`, `defparameter`, `defconstant`, and `define-symbol-macro` respectively; `type-expander` for `deftype`, along with `type-expand-1` and `type-expand` to work with type specifiers. For proclamations, `proclamation` can be used for `declaration` or CLtL2's `define-declaration`. `variable-type` covers `type`, and `special` proclamations can be done with `make-variable`. `operator-ftype` handles `ftype` and `operator-inline` `inline`. User-defined inlining data, such as a definition, can be associated with an operator through `operator-inline-data`. From 01cb618f01544431c2c2d827065758f24b96c4e4 Mon Sep 17 00:00:00 2001 From: Jan Moringen Date: Mon, 1 Jan 2024 12:51:54 +0100 Subject: [PATCH 2/4] Allow running tests via ASDF --- Code/Test/clostrum-test.asd | 13 +++++++++++-- Code/clostrum.asd | 3 ++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Code/Test/clostrum-test.asd b/Code/Test/clostrum-test.asd index 022d8cf..c4d1d11 100644 --- a/Code/Test/clostrum-test.asd +++ b/Code/Test/clostrum-test.asd @@ -2,7 +2,16 @@ (defsystem "clostrum-test" :description "Test suite for a Clostrum implementation." - :depends-on ("clostrum" "fiveam") + :depends-on ("clostrum" + "clostrum-basic" + "fiveam") :components ((:file "packages") - (:file "tests"))) + (:file "tests")) + :perform (test-op (operation component) + (uiop:symbol-call + '#:clostrum/test '#:run-tests + nil ; client + (find-symbol "RUN-TIME-ENVIRONMENT" (find-package "CLOSTRUM-BASIC")) ; runtime env + nil ; evaluation env + (find-symbol "COMPILATION-ENVIRONMENT" (find-package "CLOSTRUM-BASIC"))))) ; compilation env diff --git a/Code/clostrum.asd b/Code/clostrum.asd index 61806d7..e8ad0ef 100644 --- a/Code/clostrum.asd +++ b/Code/clostrum.asd @@ -9,4 +9,5 @@ (:file "clostrum") (:file "default-methods") (:file "conditions") - (:file "documentation"))) + (:file "documentation")) + :in-order-to ((test-op (test-op "clostrum-test")))) From 03a710d90dc615d90a12ee7106d1aa755afc2923 Mon Sep 17 00:00:00 2001 From: Jan Moringen Date: Mon, 1 Jan 2024 13:01:05 +0100 Subject: [PATCH 3/4] Disable SBCL debugger in GitHub Actions workflow --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e81de99..ed46e32 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,7 +39,7 @@ jobs: - name: SBCL environment variables if: matrix.lisp == 'sbcl' run: | - echo -e "LISP=sbcl\nLOAD=--load\nEVAL=--eval\nQUIT=--quit" >> $GITHUB_ENV + echo -e "LISP=sbcl --disable-debugger\nLOAD=--load\nEVAL=--eval\nQUIT=--quit" >> $GITHUB_ENV - name: Install Ubuntu dependencies if: matrix.os == 'ubuntu-22.04' @@ -61,7 +61,7 @@ jobs: curl -kLO https://beta.quicklisp.org/quicklisp.lisp $LISP $LOAD quicklisp.lisp $EVAL "(quicklisp-quickstart:install)" $EVAL "(ql-util:without-prompting (ql:add-to-init-file))" $QUIT $LISP $EVAL "(ql:quickload '(:clostrum-basic :clostrum-test))" $QUIT - + - name: Run Regression Tests run: | $LISP $EVAL "(mapc #'asdf:load-system '(:clostrum-basic :clostrum-test))" $EVAL "(clostrum/test:run-tests-exit nil 'clostrum-basic:run-time-environment nil 'clostrum-basic:compilation-environment)" From 86c244fa2303f33ea4bc0de3d82ad9ed54cc2420 Mon Sep 17 00:00:00 2001 From: Alex Wood Date: Mon, 1 Jan 2024 09:46:15 -0500 Subject: [PATCH 4/4] Fix operator-cell usage in tests I changed it so that you need to use ensure-operator-cell to force a cell being created, but forgot to update this test appropriately. --- Code/Test/tests.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Test/tests.lisp b/Code/Test/tests.lisp index 2c8b9f1..c8c011f 100644 --- a/Code/Test/tests.lisp +++ b/Code/Test/tests.lisp @@ -63,7 +63,7 @@ ;;; on implementations than the cell merely existing and being boundp. (test (call-undefined-function :fixture with-envs) (let* ((fname (make-symbol "F")) - (cell (sys:operator-cell cli renv fname))) + (cell (sys:ensure-operator-cell cli renv fname))) (signals undefined-function (funcall (sys:operator-cell-value cli cell))))) (test (function-binding :fixture with-envs)