alex-gutev / cl-form-types

Library for determining the types of Common Lisp forms based on information stored in the environment.
MIT License
19 stars 1 forks source link

Test failed on ECL #22

Open Hellseher opened 6 months ago

Hellseher commented 6 months ago

Hi,

While preparing CL-CIEL for Guix I've faced with the issue where CL-FORM-TYPES failed to pass tests on ECL implementation:

Invoking ecl: "/gnu/store/gbahff6l8b6413vx52klkljr7ypmpz6c-ecl-23.9.9/bin/ecl" "--eval" "(require :asdf)" "--eval" "(asdf:initialize-source-registry (list :source-registry (list :tree (uiop:ensure-pathname \"/gnu/store/wj7rm7r9sz853xfp3lyc3dj2mnlgspar-ecl-cl-form-types-0.3.1/share/common-lisp/ecl/cl-form-types\" :truenamize t :ensure-directory t)) :inherit-configuration))" "--eval" "(asdf:test-system \"cl-form-types\")" "--eval" "(quit)"
;;; Loading #P"/gnu/store/gbahff6l8b6413vx52klkljr7ypmpz6c-ecl-23.9.9/lib/ecl-23.9.9/asdf.fas"
;;;
;;; Compiling /gnu/store/wj7rm7r9sz853xfp3lyc3dj2mnlgspar-ecl-cl-form-types-0.3.1/share/common-lisp/ecl/cl-form-types/test/test.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Error:
;;;   in file test.lisp, position 2370
;;;   at (DEFMACRO IS-FORM-TYPE ...)
;;;   * The macro form (CL-ENVIRONMENTS.CLTL2::%WALK-FORM (COMMON-LISP:DEFMACRO IS-FORM-TYPE (TYPE &BODY (FORM &KEY STRICT EXPAND-COMPILER-MACROS (TEST (QUOTE FORM-TYPE=))) &ENVIRONMENT ENV) "Check that a form is of a given type, by FORM-TYPE, in its environment.
;;;
;;;    TYPE (not evaluated) is the expected form type, which is be
;;;    compared to the actual type using FORM-TYPE=.
;;;
;;;    FORM (not evaluated) is the form of which to determine the type
;;;    using FORM-TYPE. The type is determined in the environment of this
;;;    macro form.
;;;
;;;    If STRICT is true the type returned by FORM-TYPE must equal TYPE
;;;    exactly, by EQUAL.
;;;
;;;    If EXPAND-COMPILER-MACROS is true, FORM-TYPE is called with
;;;    :EXPAND-COMPILER-MACROS T.
;;;
;;;    If TEST is given, that function is used to compare the types rather
;;;    than FORM-TYPE=." (LET ((FORM-TYPE (NTH-FORM-TYPE FORM ENV 0 NIL EXPAND-COMPILER-MACROS))) (SI:QUASIQUOTE (IS ((SI:UNQUOTE (IF STRICT (QUOTE EQUAL) TEST)) (QUOTE (SI:UNQUOTE TYPE)) (QUOTE (SI:UNQUOTE FORM-TYPE))) "~%Form type of ~s is:~%~%~s~%~%~2T which is not a subtype of:~%~%~s" (QUOTE (SI:UNQUOTE FORM)) (QUOTE (SI:UNQUOTE FORM-TYPE)) (QUOTE (SI:UNQUOTE TYPE))))))) was not expanded successfully.
;;; Error detected:
;;; Syntax error in declaration (TYPE T (FORM &KEY STRICT EXPAND-COMPILER-MACROS (TEST (QUOTE FORM-TYPE=))))An error occurred during initialization:
COMPILE-FILE-ERROR while
compiling #<cl-source-file "cl-form-types/test" "test" "test">.

Thanks, Oleg

alex-gutev commented 6 months ago

I can't seem to reproduce it, all tests pass using ECL. What version of ECL are you using? Mine might be a bit outdated. Also, I noticed quicklisp, don't know if you're using it, hasn't been updated in a while, the last update was on 2023-10-21. I fixed some issues in cl-form-types and cl-environments since then. Try with the latest commits of cl-environments and cl-form-types, and let me know if the issue persists.