emacs-elsa / Elsa

Emacs Lisp Static Analyzer and gradual type system.
GNU General Public License v3.0
640 stars 26 forks source link

Elsa crashes with `Unknown specializer elsa-explainer` #207

Closed ethan-leba closed 1 year ago

ethan-leba commented 1 year ago

Very cool to see some new progress on the project! I just tried testing it out and sadly hit this error:

~/Dropbox/tree-edit [nextws] λ cask exec elsa

Error: error ("Unknown specializer elsa-explainer")
  mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode -0xd2c181c8a512f81>))
  debug-early-backtrace()
  debug-early(error (error "Unknown specializer elsa-explainer"))
  error("Unknown specializer %S" elsa-explainer)
  #f(compiled-function (specializer) "Support for the catch-all t specializer which always matches." #<bytecode 0x1c7ab1932153714b>)(elsa-explainer)
  apply(#f(compiled-function (specializer) "Support for the catch-all t specializer which always matches." #<bytecode 0x1c7ab1932153714b>) elsa-explainer)
  #f(compiled-function (&rest args) #<bytecode -0x151136ae20f8eac5>)()
  #f(compiled-function (cl--cnm specializer) #<bytecode 0x1b492261aedd7322>)(#f(compiled-function (&rest args) #<bytecode -0x151136ae20f8eac5>) elsa-explainer)
  apply(#f(compiled-function (cl--cnm specializer) #<bytecode 0x1b492261aedd7322>) #f(compiled-function (&rest args) #<bytecode -0x151136ae20f8eac5>) elsa-explainer)
  #f(compiled-function (specializer) "Support for (head VAL) specializers.\nThese match if the argument is a cons cell whose car is `eql' to VAL." #<bytecode -0x150e484325ada560>)(elsa-explainer)
  apply(#f(compiled-function (specializer) "Support for (head VAL) specializers.\nThese match if the argument is a cons cell whose car is `eql' to VAL." #<bytecode -0x150e484325ada560>) elsa-explainer)
  #f(compiled-function (&rest args) #<bytecode -0x17e2a19150426221>)()
  #f(compiled-function (cl--cnm type) #<bytecode -0x346afc176eeaa94>)(#f(compiled-function (&rest args) #<bytecode -0x17e2a19150426221>) elsa-explainer)
  apply(#f(compiled-function (cl--cnm type) #<bytecode -0x346afc176eeaa94>) #f(compiled-function (&rest args) #<bytecode -0x17e2a19150426221>) elsa-explainer)
  #f(compiled-function (type) "Support for dispatch on types defined by `cl-defstruct'." #<bytecode -0xf459306b76f28ea>)(elsa-explainer)
  apply(#f(compiled-function (type) "Support for dispatch on types defined by `cl-defstruct'." #<bytecode -0xf459306b76f28ea>) elsa-explainer)
  #f(compiled-function (&rest args) #<bytecode 0x174f2971ae5ee823>)()
  #f(compiled-function (cl--cnm type) #<bytecode -0xbdc0456cff71f22>)(#f(compiled-function (&rest args) #<bytecode 0x174f2971ae5ee823>) elsa-explainer)
  apply(#f(compiled-function (cl--cnm type) #<bytecode -0xbdc0456cff71f22>) #f(compiled-function (&rest args) #<bytecode 0x174f2971ae5ee823>) elsa-explainer)
  #f(compiled-function (type) "Support for dispatch on builtin types.\nSee the full list and their hierarchy in `cl--typeof-types'." #<bytecode -0x4423deb0b76349c>)(elsa-explainer)
  apply(#f(compiled-function (type) "Support for dispatch on builtin types.\nSee the full list and their hierarchy in `cl--typeof-types'." #<bytecode -0x4423deb0b76349c>) elsa-explainer)
  #f(compiled-function (&rest args) #<bytecode -0xcd04360bb967512>)()
  #f(compiled-function (cl--cnm type) #<bytecode -0x1f0022b6ce9c4fe6>)(#f(compiled-function (&rest args) #<bytecode -0xcd04360bb967512>) elsa-explainer)
  apply(#f(compiled-function (cl--cnm type) #<bytecode -0x1f0022b6ce9c4fe6>) #f(compiled-function (&rest args) #<bytecode -0xcd04360bb967512>) elsa-explainer)
  #f(compiled-function (type) "Support for dispatch on types defined by `oclosure-define'." #<bytecode -0x1f56464549192709>)(elsa-explainer)
  apply(#f(compiled-function (type) "Support for dispatch on types defined by `oclosure-define'." #<bytecode -0x1f56464549192709>) elsa-explainer)
  #f(compiled-function (&rest args) #<bytecode 0xf24840f8c793474>)()
  #f(compiled-function (cl--cnm specializer) #<bytecode -0x135d2f94c8df8a02>)(#f(compiled-function (&rest args) #<bytecode 0xf24840f8c793474>) elsa-explainer)
  apply(#f(compiled-function (cl--cnm specializer) #<bytecode -0x135d2f94c8df8a02>) #f(compiled-function (&rest args) #<bytecode 0xf24840f8c793474>) elsa-explainer)
  #f(compiled-function (specializer) "Support for dispatch on types defined by EIEIO's `defclass'." #<bytecode -0xd630f312cce7b41>)(elsa-explainer)
  apply(#f(compiled-function (specializer) "Support for dispatch on types defined by EIEIO's `defclass'." #<bytecode -0xd630f312cce7b41>) elsa-explainer nil)
  cl-generic-generalizers(elsa-explainer)
  cl-generic-define-method(elsa-make-error nil ((expression elsa-form) (explainer elsa-explainer) &rest args) nil #f(compiled-function (expression explainer &rest args) "Create `elsa-error' object.\n\nEXPRESSION is a form to which the error will be attached.\n\nEXPLAINER is an instance of `elsa-explainer'.\n\nIf ARGS contains :compact t, if the explanation only has one\nadditional line, this line will be dropped, because most likely\nit only reformulates the first line." #<bytecode 0x19754256fad59136>))
  byte-code("\300\301\302\301\303\304#\305#\210\306\301\307\310#\311\301\304\312\304\313%\210\311\301\304\314\304\315%\210\300\316\302\316\317\304#\305#\210\306\316\307\310#\311\316\304\320\304\321%\210\311\316\304\322\304\323%\210\300\324\302\324\325\304#\305#\210\306\324\307\310#\311\324\304\326\304\327%\210\311\324\304\330\304\331%\210\332\333!\207" [defalias elsa-make-error cl-generic-define (thing format &rest args) nil "\n\n(fn THING FORMAT &rest ARGS)" function-put lisp-indent-function 1 cl-generic-define-method ((expression elsa-form) (format string) &rest args) #f(compiled-function (expression format &rest args) #<bytecode 0x179225e3031222c8>) ((expression elsa-form) (explainer elsa-explainer) &rest args) #f(compiled-function (expression explainer &rest args) "Create `elsa-error' object.\n\nEXPRESSION is a form to which the error will be attached.\n\nEXPLAINER is an instance of `elsa-explainer'.\n\nIf ARGS contains :compact t, if the explanation only has one\nadditional line, this line will be dropped, because most likely\nit only reformulates the first line." #<bytecode 0x19754256fad59136>) elsa-make-warning (thing format &rest args) ((expression elsa-form) (format string) &rest args) #f(compiled-function (expression format &rest args) #<bytecode 0x179225e1634ef7c8>) ((expression elsa-form) (explainer elsa-explainer) &rest args) #f(compiled-function (expression explainer &rest args) "Create `elsa-warning' object.\n\nEXPRESSION is a form to which the error will be attached.\n\nEXPLAINER is an instance of `elsa-explainer'.\n\nIf ARGS contains :compact t, if the explanation only has one\nadditional line, this line will be dropped, because most likely\nit only reformulates the first line." #<bytecode -0xed776aa9f552150>) elsa-make-notice (thing format &rest args) ((expression elsa-form) (format string) &rest args) #f(compiled-function (expression format &rest args) #<bytecode 0x179225e1634f42c8>) ((expression elsa-form) (explainer elsa-explainer) &rest args) #f(compiled-function (expression explainer &rest args) "Create `elsa-notice' object.\n\nEXPRESSION is a form to which the error will be attached.\n\nEXPLAINER is an instance of `elsa-explainer'.\n\nIf ARGS contains :compact t, if the explanation only has one\nadditional line, this line will be dropped, because most likely\nit only reformulates the first line." #<bytecode 0x14bb81beb9ff6502>) provide elsa-error] 9)
  require(elsa-error)
  byte-code("\301\302!\210\303\20\301\304!\210\301\305!\210\301\306!\210\301\307!\210\301\310!\210\311\312\313\314!\"\210\311\315\316\314!\"\210\317\314\320\315#\321\314\303\322\323$\207" [eieio-backward-compatibility require eieio nil trinary elsa-types elsa-scope elsa-error elsa-methods defalias elsa-cl-structure-p eieio-make-class-predicate elsa-cl-structure elsa-cl-structure--eieio-childp eieio-make-child-predicate define-symbol-prop cl-deftype-satisfies eieio-defclass-internal ((name :initarg :name :documentation "Name of the structure.") (slots :type hash-table :initarg :slots :initform (make-hash-table) :documentation "Slots available on the structure.\n\nDoes not include slots on parents.") (parents :type list :initarg :parents :documentation "Tree of parents of this structure.") (file :initarg :file :documentation "File where the structure was declared.")) (:documentation "Representation of a `cl-defstruct' or `defclass'.")] 6)
  require(elsa-state)
  byte-code("\301\302!\210\303\20\301\304!\210\301\305!\210\301\306!\210\301\307!\210\301\310!\210\301\311!\210\301\312!\210\301\313!\210\301\314!\210\301\315!\210\301\316!\210\301\317!\210\301\320!\210\301\321!\210\301\322!\210\301\323!\210\301\324!\210\301\325!\210\301\326!\210\301\327!\207" [eieio-backward-compatibility require eieio nil jka-compr dash ansi cl-lib cl-extra warnings elsa-dependencies elsa-types elsa-scope elsa-state elsa-error elsa-analyser elsa-reader elsa-log elsa-declare elsa-ruleset elsa-extension-builtin elsa-typed-syntax elsa-typed-thingatpt elsa-typed-subr] 2)
  command-line-1(("--no-splash" "--eval" "(setq enable-dir-local-variables nil eieio-backward-compatibility nil)" "--load=elsa" "--funcall=elsa-run"))
  command-line()
  normal-top-level()
Unknown specializer elsa-explainer

Any ideas?

Fuco1 commented 1 year ago

Yes, I'm getting the same and can't figure it out :D The native compilation really makes debugging impossible, I have to rebuild my emacs to get rid of it again :/

Fuco1 commented 1 year ago

I have misunderstood some intricacies with eval-and-compile and eval-when-compile. Now it should be fixed. If you're pulling from MELPA, it will build in couple of hours I guess.