GrammaTech / sel

Programmatic modification and evaluation of software
https://grammatech.github.io/sel/#Top
Other
169 stars 21 forks source link

Loading test/template.lisp fails on macro-expansion of a match clause #24

Closed eschulte closed 2 years ago

eschulte commented 2 years ago

Specifically I get the following error in my slime REPL. Commenting out the test-match-derive test allows the file to load. This is with the versions of all tree-sitter libraries listed in tools/tree-sitter-install.sh.

Error Backtrace:

; file: /Users/eschulte/quicklisp/local-projects/sel/test/template.lisp
; in: DEFTEST TEST-MATCH-DERIVE
;     (TRIVIA.LEVEL2:EMATCH (SOFTWARE-EVOLUTION-LIBRARY/TEST/TEMPLATE::MAKE-DERIVE
;                            '("PartialEq" "PartialOrd"))
;       ((SOFTWARE-EVOLUTION-LIBRARY/SOFTWARE/TREE-SITTER:RUST "#[derive(@ARGS)]"
;                                                              :ARGS
;                                                              SOFTWARE-EVOLUTION-LIBRARY/TEST/TEMPLATE::ARGS)
;        (STEFIL:IS
;         (FSET::EVERY #'SOFTWARE-EVOLUTION-LIBRARY/SOFTWARE/PARSEABLE:SOURCE-TEXT=
;                      SOFTWARE-EVOLUTION-LIBRARY/TEST/TEMPLATE::ARGS
;                      '("PartialEq" "PartialOrd")))))
; --> TRIVIA.LEVEL2:MATCH2+ 
; ==>
;   (TRIVIA.LEVEL2:MATCH2*+ ((SOFTWARE-EVOLUTION-LIBRARY/TEST/TEMPLATE::MAKE-DERIVE
;                             '("PartialEq" "PartialOrd")))
;       (T)
;     (((SOFTWARE-EVOLUTION-LIBRARY/SOFTWARE/TREE-SITTER:RUST "#[derive(@ARGS)]"
;                                                             :ARGS
;                                                             SOFTWARE-EVOLUTION-LIBRARY/TEST/TEMPLATE::ARGS))
;      (STEFIL:IS
;       (FSET::EVERY #'SOFTWARE-EVOLUTION-LIBRARY/SOFTWARE/PARSEABLE:SOURCE-TEXT=
;                    SOFTWARE-EVOLUTION-LIBRARY/TEST/TEMPLATE::ARGS
;                    '("PartialEq" "PartialOrd"))))
;     ((#:OTHERWISE1674)
;      (ERROR 'TRIVIA.LEVEL2:MATCH-ERROR :PATTERN '((# #)) :VALUES
;             (LIST #:OTHERWISE1674))))
; 
; caught ERROR:
;   during macroexpansion of
;   (MATCH2*+ (#)
;       (T)
;     ...).
;   Use *BREAK-ON-SIGNALS* to intercept.
;   
;    Unknown &KEY argument: :NAME-GENERATOR
berchn commented 2 years ago

What version of cl-tree-sitter is being used? A few things were changed for Rust support, and a :name-generator keyword argument was added to cl-tree-sitter:parse-string.

eschulte commented 2 years ago

Ah, my cl-tree-sitter was 11 months old. Confirmed, I can load with the latest. Thanks!