Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eask lint elsa issues #219

Open
smeagol74 opened this issue Jun 9, 2023 · 7 comments
Open

eask lint elsa issues #219

smeagol74 opened this issue Jun 9, 2023 · 7 comments

Comments

@smeagol74
Copy link

eask version 0.8.1
elsa version 20230318.2024

When trying to run eask lint elsa first received errors about missing dependencies async and lgr. Added as dev dependencies to my Eask file and perform eask install-deps --dev. After that elsa looks like started and here is the output:

Unmatched dependency ’s’; add (s "VERSION") to package-file or consider removing it
Unmatched dependency ’yaml’; add (yaml "VERSION") to package-file or consider removing it
Unmatched dependency ’org’; add (org "VERSION") to package-file or consider removing it
Unmatched dependency ’promise’; add (promise "VERSION") to package-file or consider removing it
Unmatched dependency ’request’; add (request "VERSION") to package-file or consider removing it
  - Skipping elsa (20230318.2024)... already installed ✗
.eask/28.2/elpa/elsa-20230318.2024/elsa-analyser.el: Warning: Use -zip-pair instead of -zip to get a list of pairs
.eask/28.2/elpa/elsa-20230318.2024/elsa-rules-list.el: Warning: Use -zip-pair instead of -zip to get a list of pairs

‘prav.el‘ with elsa (20230318.2024)

      Autoloading types for subr
      Autoloading extension for subr
[1/2] Processing file /usr/local/Cellar/emacs-plus@28/28.2/share/emacs/28.2/lisp/subr.el.gz ...

Debugger entered--Lisp error: (void-variable mixed)
  #f(compiled-function (scope var &optional updater) #<bytecode 0x5837d64f0f1e1c2>)(#<elsa-scope elsa-scope-1ff523ce006c> #<elsa-variable (defining-kbd-macro (diff unbound nil))> nil)
  apply(#f(compiled-function (scope var &optional updater) #<bytecode 0x5837d64f0f1e1c2>) #<elsa-scope elsa-scope-1ff523ce006c> (#<elsa-variable (defining-kbd-macro (diff unbound nil))> nil))
  #f(compiled-function (arg &rest args) #<bytecode 0x6045641a7471314>)(#<elsa-scope elsa-scope-1ff523ce006c> #<elsa-variable (defining-kbd-macro (diff unbound nil))> nil)
  apply(#f(compiled-function (arg &rest args) #<bytecode 0x6045641a7471314>) #<elsa-scope elsa-scope-1ff523ce006c> #<elsa-variable (defining-kbd-macro (diff unbound nil))> nil)
  elsa-scope-narrow-var(#<elsa-scope elsa-scope-1ff523ce006c> #<elsa-variable (defining-kbd-macro (diff unbound nil))> nil)
  #f(compiled-function (scope var &optional updater) #<bytecode -0x181dbfb6c0743ed5>)(#<elsa-scope elsa-scope-1ff523ce006c> (#<elsa-variable (defining-kbd-macro (diff unbound nil))>))
  apply(#f(compiled-function (scope var &optional updater) #<bytecode -0x181dbfb6c0743ed5>) #<elsa-scope elsa-scope-1ff523ce006c> (#<elsa-variable (defining-kbd-macro (diff unbound nil))>))
  #f(compiled-function (arg &rest args) #<bytecode 0x60456457b031314>)(#<elsa-scope elsa-scope-1ff523ce006c> (#<elsa-variable (defining-kbd-macro (diff unbound nil))>))
  apply(#f(compiled-function (arg &rest args) #<bytecode 0x60456457b031314>) #<elsa-scope elsa-scope-1ff523ce006c> (#<elsa-variable (defining-kbd-macro (diff unbound nil))>) nil)
  elsa-scope-narrow-var(#<elsa-scope elsa-scope-1ff523ce006c> (#<elsa-variable (defining-kbd-macro (diff unbound nil))>))
  (progn (elsa-scope-protect scope 'elsa--barrier) (elsa-scope-narrow-var scope (eieio-oref condition 'narrow-types)) (elsa--analyse-form true-body scope state) (setq mutated-vars-true (elsa-scope-get-assigned-vars scope)) (elsa-scope-unassign scope 'elsa--barrier))
  (progn (let* ((x (elsa-type-is-non-nil condition)) (v state)) (eieio-oset v 'reachable (cons x (eieio-oref v 'reachable)))) (progn (elsa-scope-protect scope 'elsa--barrier) (elsa-scope-narrow-var scope (eieio-oref condition 'narrow-types)) (elsa--analyse-form true-body scope state) (setq mutated-vars-true (elsa-scope-get-assigned-vars scope)) (elsa-scope-unassign scope 'elsa--barrier)) (car-safe (let* ((v state) (x (eieio-oref v 'reachable))) (prog1 x (eieio-oset v 'reachable (cdr x))))))
  (let ((condition (elsa-nth 1 form)) (true-body (elsa-nth 2 form)) (false-body (elsa-nthcdr 3 form)) (mutated-vars-true nil) (mutated-vars-false nil)) (elsa--analyse-form condition scope state) (progn (let* ((x (elsa-type-is-non-nil condition)) (v state)) (eieio-oset v 'reachable (cons x (eieio-oref v 'reachable)))) (progn (elsa-scope-protect scope 'elsa--barrier) (elsa-scope-narrow-var scope (eieio-oref condition 'narrow-types)) (elsa--analyse-form true-body scope state) (setq mutated-vars-true (elsa-scope-get-assigned-vars scope)) (elsa-scope-unassign scope 'elsa--barrier)) (car-safe (let* ((v state) (x (eieio-oref v 'reachable))) (prog1 x (eieio-oset v 'reachable (cdr x)))))) (progn (let* ((x (elsa-type-is-nil condition)) (v state)) (eieio-oset v 'reachable (cons x (eieio-oref v 'reachable)))) (progn (elsa-scope-protect scope 'elsa--barrier) (elsa-scope-narrow-var scope (eieio-oref condition 'narrow-types) 'elsa-variable-diff) (elsa--analyse-body false-body scope state) (setq mutated-vars-false (elsa-scope-get-assigned-vars scope)) (elsa-scope-unassign scope 'elsa--barrier)) (car-safe (let* ((v state) (x (eieio-oref v 'reachable))) (prog1 x (eieio-oset v 'reachable (cdr x)))))) (let ((condition-is-nil (elsa-type-is-nil condition)) (to-merge)) (cond ((trinary-true-p condition-is-nil) (setq to-merge (let ((list ...) (i 0)) (while list (let ... ... ...) (setq i ...))))) ((trinary-false-p condition-is-nil) (setq to-merge (let ((list ...) (i 0)) (while list (let ... ... ...) (setq i ...))))) ((trinary-maybe-p condition-is-nil) (let ((input0 (elsa--variables-partition mutated-vars-true mutated-vars-false))) (let* ((--dash-source-1-- input0) (true ...) (false ...) (both ...)) (-each (-concat true false) #'...) (setq to-merge (-concat both to-merge)))))) (elsa-variables-merge-to-scope to-merge scope)) (let ((true-result-type (elsa-get-type true-body)) (false-result-type (if false-body (elsa-get-type (-last-item false-body)) (elsa-type-nil)))) (eieio-oset form 'type (cond ((trinary-true-p (elsa-type-is-non-nil condition)) true-result-type) ((trinary-true-p (elsa-type-is-nil condition)) false-result-type) (t (elsa-type-sum true-result-type false-result-type))))))
  elsa--analyse:if(#<elsa-form (if defining-kbd-macro (error "%s is undefined" (key-description (this-single-command-keys))) (message "%s is undefined" (key-description (this-single-command-keys))))> #<elsa-scope elsa-scope-1ff523ce006c> #<elsa-state elsa-state-1ff523ce4904>)
  funcall(elsa--analyse:if #<elsa-form (if defining-kbd-macro (error "%s is undefined" (key-description (this-single-command-keys))) (message "%s is undefined" (key-description (this-single-command-keys))))> #<elsa-scope elsa-scope-1ff523ce006c> #<elsa-state elsa-state-1ff523ce4904>)
  (let nil (funcall analyse-fn-name form scope state))
  (cond ((functionp analyse-fn-name) (let nil (funcall analyse-fn-name form scope state))) ((and (eieio-oref form 'expanded-form) (eieio-oref form 'was-expanded)) (let nil (let ((exp-form (eieio-oref form 'expanded-form))) (elsa--analyse-form exp-form scope state) (let ((form-alist nil)) (elsa-form-visit form #'(lambda ... ...))) (eieio-oset form 'type (eieio-oref exp-form 'type)) (eieio-oset form 'narrow-types (eieio-oref exp-form 'narrow-types))))) ((eq name '\`) (let nil (elsa--analyse-backquote form scope state))) ((eq name '\,) (let nil (elsa--analyse-unquote form scope state))) ((eq name '\,@) (let nil (elsa--analyse-splice form scope state))) (t (let nil (elsa--analyse-function-call form scope state))))
  (let* ((name (eieio-oref head 'name)) (analyse-fn-name (intern (concat "elsa--analyse:" (symbol-name name))))) (cond ((functionp analyse-fn-name) (let nil (funcall analyse-fn-name form scope state))) ((and (eieio-oref form 'expanded-form) (eieio-oref form 'was-expanded)) (let nil (let ((exp-form (eieio-oref form ...))) (elsa--analyse-form exp-form scope state) (let ((form-alist nil)) (elsa-form-visit form #'...)) (eieio-oset form 'type (eieio-oref exp-form 'type)) (eieio-oset form 'narrow-types (eieio-oref exp-form 'narrow-types))))) ((eq name '\`) (let nil (elsa--analyse-backquote form scope state))) ((eq name '\,) (let nil (elsa--analyse-unquote form scope state))) ((eq name '\,@) (let nil (elsa--analyse-splice form scope state))) (t (let nil (elsa--analyse-function-call form scope state)))))
  (if (and (not (elsa-state-quoted-p state)) (elsa-form-symbol-p head)) (let* ((name (eieio-oref head 'name)) (analyse-fn-name (intern (concat "elsa--analyse:" (symbol-name name))))) (cond ((functionp analyse-fn-name) (let nil (funcall analyse-fn-name form scope state))) ((and (eieio-oref form 'expanded-form) (eieio-oref form 'was-expanded)) (let nil (let ((exp-form ...)) (elsa--analyse-form exp-form scope state) (let (...) (elsa-form-visit form ...)) (eieio-oset form 'type (eieio-oref exp-form ...)) (eieio-oset form 'narrow-types (eieio-oref exp-form ...))))) ((eq name '\`) (let nil (elsa--analyse-backquote form scope state))) ((eq name '\,) (let nil (elsa--analyse-unquote form scope state))) ((eq name '\,@) (let nil (elsa--analyse-splice form scope state))) (t (let nil (elsa--analyse-function-call form scope state))))) (elsa--analyse-body (elsa-form-sequence form) scope state))
...
  (let ((inhibit-message t) message-log-max) (setq errors (eieio-oref (elsa-analyse-file filename elsa-global-state) 'errors)))
  (if (eask--reach-verbosity-p 'debug) (progn (setq errors (eieio-oref (elsa-analyse-file filename elsa-global-state) 'errors))) (let ((inhibit-message t) message-log-max) (setq errors (eieio-oref (elsa-analyse-file filename elsa-global-state) 'errors))))
  (let* ((filename (expand-file-name filename)) (file (eask-root-del filename)) errors) (eask-msg "") (eask-msg "`%s` with elsa (%s)" (ansi-green file) eask--elsa-version) (if (eask--reach-verbosity-p 'debug) (progn (setq errors (eieio-oref (elsa-analyse-file filename elsa-global-state) 'errors))) (let ((inhibit-message t) message-log-max) (setq errors (eieio-oref (elsa-analyse-file filename elsa-global-state) 'errors)))) (if errors (--each (reverse errors) (let ((line (string-trim (concat file ":" ...)))) (cond ((string-match-p "[: ][Ee]rror:" line) (eask-error line)) ((string-match-p "[: ][Ww]arning:" line) (eask-warn line)) (t (eask-log line))))) (eask-msg "No issues found")))
  eask--elsa-analyse-file("/Users/irbis/prj/irbis/gitlab/prav/emacs-client/pr...")
  mapcar(eask--elsa-analyse-file ("/Users/irbis/prj/irbis/gitlab/prav/emacs-client/pr..." "/Users/irbis/prj/irbis/gitlab/prav/emacs-client/pr..." "/Users/irbis/prj/irbis/gitlab/prav/emacs-client/pr..." "/Users/irbis/prj/irbis/gitlab/prav/emacs-client/pr..."))
  (cond (files (elsa-load-config) (mapcar #'eask--elsa-analyse-file files) (eask-msg "") (eask-info "(Total of %s file%s linted)" (length files) (eask--sinr files "" "s"))) (patterns (eask-msg "") (eask-info "(No files match wildcard: %s)" (mapconcat #'identity patterns " "))) (t (eask-msg "") (eask-info "(No files have been linted)") (eask-help "lint/elsa")))
  (let* ((patterns (eask-args)) (files (if patterns (eask-expand-file-specs patterns) (eask-package-el-files)))) (cond (files (elsa-load-config) (mapcar #'eask--elsa-analyse-file files) (eask-msg "") (eask-info "(Total of %s file%s linted)" (length files) (eask--sinr files "" "s"))) (patterns (eask-msg "") (eask-info "(No files match wildcard: %s)" (mapconcat #'identity patterns " "))) (t (eask-msg "") (eask-info "(No files have been linted)") (eask-help "lint/elsa"))))
  (let* ((command (eask-command)) (before (concat "eask-before-" command "-hook")) (after (concat "eask-after-" command "-hook"))) (run-hooks 'eask-before-command-hook) (run-hooks (intern before)) (let ((package-archives package-archives) (archives (eask-listify "melpa")) (added)) (let ((--dolist-tail-- archives)) (while --dolist-tail-- (let ((archive (car --dolist-tail--))) (if (assoc archive package-archives) nil (setq added t) (if eask-elapsed-time (let ... ... ... ...) (condition-case nil ... ...) (eask-f-source archive) (condition-case nil ... ...))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (if added (progn (if eask-elapsed-time (let ((now ...)) (condition-case nil (progn ...) (error nil)) (let (... message-log-max) (eask-pkg-init t)) (let (...) (if ... ... ... ...))) (condition-case nil (progn (eask-write "Refresh archives information... ")) (error nil)) (let ((inhibit-message t) message-log-max) (eask-pkg-init t)) (condition-case nil (progn (eask-msg "done ✓")) (error nil))))) (eask-package-install 'elsa)) (setq eask--elsa-version (eask-package--version-string 'elsa)) (require 'elsa) (let* ((patterns (eask-args)) (files (if patterns (eask-expand-file-specs patterns) (eask-package-el-files)))) (cond (files (elsa-load-config) (mapcar #'eask--elsa-analyse-file files) (eask-msg "") (eask-info "(Total of %s file%s linted)" (length files) (eask--sinr files "" "s"))) (patterns (eask-msg "") (eask-info "(No files match wildcard: %s)" (mapconcat #'identity patterns " "))) (t (eask-msg "") (eask-info "(No files have been linted)") (eask-help "lint/elsa")))) (run-hooks (intern after)) (run-hooks 'eask-after-command-hook))
  (if (not eask-file) (eask-help "core/init") (package-activate-all) (condition-case nil (progn (make-directory package-user-dir t)) (error nil)) (let ((inhibit-message t) message-log-max) (eask-setup-paths)) (let* ((command (eask-command)) (before (concat "eask-before-" command "-hook")) (after (concat "eask-after-" command "-hook"))) (run-hooks 'eask-before-command-hook) (run-hooks (intern before)) (let ((package-archives package-archives) (archives (eask-listify "melpa")) (added)) (let ((--dolist-tail-- archives)) (while --dolist-tail-- (let ((archive ...)) (if (assoc archive package-archives) nil (setq added t) (if eask-elapsed-time ... ... ... ...)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (if added (progn (if eask-elapsed-time (let (...) (condition-case nil ... ...) (let ... ...) (let ... ...)) (condition-case nil (progn ...) (error nil)) (let (... message-log-max) (eask-pkg-init t)) (condition-case nil (progn ...) (error nil))))) (eask-package-install 'elsa)) (setq eask--elsa-version (eask-package--version-string 'elsa)) (require 'elsa) (let* ((patterns (eask-args)) (files (if patterns (eask-expand-file-specs patterns) (eask-package-el-files)))) (cond (files (elsa-load-config) (mapcar #'eask--elsa-analyse-file files) (eask-msg "") (eask-info "(Total of %s file%s linted)" (length files) (eask--sinr files "" "s"))) (patterns (eask-msg "") (eask-info "(No files match wildcard: %s)" (mapconcat #'identity patterns " "))) (t (eask-msg "") (eask-info "(No files have been linted)") (eask-help "lint/elsa")))) (run-hooks (intern after)) (run-hooks 'eask-after-command-hook)))
  (let ((eask--first-init-p (not (file-directory-p user-emacs-directory)))) (if (eask--reach-verbosity-p 'debug) (progn (if (eask-file-try-load "./") (eask-msg "✓ Loading Eask file in %s... done!" eask-file) (eask-msg "✗ Loading Eask file... missing!")) (message "")) (let ((inhibit-message t) message-log-max) (if (eask-file-try-load "./") (eask-msg "✓ Loading Eask file in %s... done!" eask-file) (eask-msg "✗ Loading Eask file... missing!")) (message ""))) (if (not eask-file) (eask-help "core/init") (package-activate-all) (condition-case nil (progn (make-directory package-user-dir t)) (error nil)) (let ((inhibit-message t) message-log-max) (eask-setup-paths)) (let* ((command (eask-command)) (before (concat "eask-before-" command "-hook")) (after (concat "eask-after-" command "-hook"))) (run-hooks 'eask-before-command-hook) (run-hooks (intern before)) (let ((package-archives package-archives) (archives (eask-listify "melpa")) (added)) (let ((--dolist-tail-- archives)) (while --dolist-tail-- (let (...) (if ... nil ... ...) (setq --dolist-tail-- ...)))) (if added (progn (if eask-elapsed-time (let ... ... ... ...) (condition-case nil ... ...) (let ... ...) (condition-case nil ... ...)))) (eask-package-install 'elsa)) (setq eask--elsa-version (eask-package--version-string 'elsa)) (require 'elsa) (let* ((patterns (eask-args)) (files (if patterns (eask-expand-file-specs patterns) (eask-package-el-files)))) (cond (files (elsa-load-config) (mapcar #'eask--elsa-analyse-file files) (eask-msg "") (eask-info "(Total of %s file%s linted)" (length files) (eask--sinr files "" "s"))) (patterns (eask-msg "") (eask-info "(No files match wildcard: %s)" (mapconcat ... patterns " "))) (t (eask-msg "") (eask-info "(No files have been linted)") (eask-help "lint/elsa")))) (run-hooks (intern after)) (run-hooks 'eask-after-command-hook))))
  (let* ((user-emacs-directory (expand-file-name (concat ".eask/" emacs-version "/") nil)) (package-user-dir (expand-file-name "elpa" user-emacs-directory)) (early-init-file (locate-user-emacs-file "early-init.el")) (user-init-file (locate-user-emacs-file "init.el")) (custom-file (locate-user-emacs-file "custom.el"))) (let ((eask--first-init-p (not (file-directory-p user-emacs-directory)))) (if (eask--reach-verbosity-p 'debug) (progn (if (eask-file-try-load "./") (eask-msg "✓ Loading Eask file in %s... done!" eask-file) (eask-msg "✗ Loading Eask file... missing!")) (message "")) (let ((inhibit-message t) message-log-max) (if (eask-file-try-load "./") (eask-msg "✓ Loading Eask file in %s... done!" eask-file) (eask-msg "✗ Loading Eask file... missing!")) (message ""))) (if (not eask-file) (eask-help "core/init") (package-activate-all) (condition-case nil (progn (make-directory package-user-dir t)) (error nil)) (let ((inhibit-message t) message-log-max) (eask-setup-paths)) (let* ((command (eask-command)) (before (concat "eask-before-" command "-hook")) (after (concat "eask-after-" command "-hook"))) (run-hooks 'eask-before-command-hook) (run-hooks (intern before)) (let ((package-archives package-archives) (archives (eask-listify "melpa")) (added)) (let ((--dolist-tail-- archives)) (while --dolist-tail-- (let ... ... ...))) (if added (progn (if eask-elapsed-time ... ... ... ...))) (eask-package-install 'elsa)) (setq eask--elsa-version (eask-package--version-string 'elsa)) (require 'elsa) (let* ((patterns (eask-args)) (files (if patterns ... ...))) (cond (files (elsa-load-config) (mapcar ... files) (eask-msg "") (eask-info "(Total of %s file%s linted)" ... ...)) (patterns (eask-msg "") (eask-info "(No files match wildcard: %s)" ...)) (t (eask-msg "") (eask-info "(No files have been linted)") (eask-help "lint/elsa")))) (run-hooks (intern after)) (run-hooks 'eask-after-command-hook)))))
  (cond ((or (eask-global-p) (eask-special-p)) (let* ((user-emacs-directory (expand-file-name (concat ".eask/" emacs-version "/") (concat eask-homedir "../"))) (package-user-dir (expand-file-name "elpa" user-emacs-directory)) (early-init-file (locate-user-emacs-file "early-init.el")) (user-init-file (locate-user-emacs-file "init.el")) (custom-file (locate-user-emacs-file "custom.el"))) (let ((eask--first-init-p (not ...))) (if (eask--reach-verbosity-p 'debug) (progn (if ... ... ...) (message "")) (let (... message-log-max) (if ... ... ...) (message ""))) (package-activate-all) (condition-case nil (progn (make-directory package-user-dir t)) (error nil)) (let* ((command ...) (before ...) (after ...)) (run-hooks 'eask-before-command-hook) (run-hooks (intern before)) (let (... ... ...) (let ... ...) (if added ...) (eask-package-install ...)) (setq eask--elsa-version (eask-package--version-string ...)) (require 'elsa) (let* (... ...) (cond ... ... ...)) (run-hooks (intern after)) (run-hooks 'eask-after-command-hook))))) ((eask-config-p) (let ((inhibit-config (eask-quick-p))) (if (eask--reach-verbosity-p 'debug) (progn (if (eask-file-try-load "./") (eask-msg "✓ Loading config Eask file in %s... done!" eask-file) (eask-msg "✗ Loading config Eask file... missing!")) (message "")) (let ((inhibit-message t) message-log-max) (if (eask-file-try-load "./") (eask-msg "✓ Loading config Eask file in %s... done!" eask-file) (eask-msg "✗ Loading config Eask file... missing!")) (message ""))) (package-activate-all) (if eask-elapsed-time (let ((now ...)) (condition-case nil (progn ...) (error nil)) (if (eask--reach-verbosity-p ...) (progn ...) (let ... ...)) (let (...) (if ... ... ... ...))) (condition-case nil (progn (eask-write ...)) (error nil)) (if (eask--reach-verbosity-p 'all) (progn (if inhibit-config nil ... ... ...)) (let (... message-log-max) (if inhibit-config nil ... ... ...))) (condition-case nil (progn (eask-msg ...)) (error nil))) (let* ((command (eask-command)) (before (concat "eask-before-" command "-hook")) (after (concat "eask-after-" command "-hook"))) (run-hooks 'eask-before-command-hook) (run-hooks (intern before)) (let ((package-archives package-archives) (archives ...) (added)) (let (...) (while --dolist-tail-- ...)) (if added (progn ...)) (eask-package-install 'elsa)) (setq eask--elsa-version (eask-package--version-string 'elsa)) (require 'elsa) (let* ((patterns ...) (files ...)) (cond (files ... ... ... ...) (patterns ... ...) (t ... ... ...))) (run-hooks (intern after)) (run-hooks 'eask-after-command-hook)))) (t (let* ((user-emacs-directory (expand-file-name (concat ".eask/" emacs-version "/") nil)) (package-user-dir (expand-file-name "elpa" user-emacs-directory)) (early-init-file (locate-user-emacs-file "early-init.el")) (user-init-file (locate-user-emacs-file "init.el")) (custom-file (locate-user-emacs-file "custom.el"))) (let ((eask--first-init-p (not ...))) (if (eask--reach-verbosity-p 'debug) (progn (if ... ... ...) (message "")) (let (... message-log-max) (if ... ... ...) (message ""))) (if (not eask-file) (eask-help "core/init") (package-activate-all) (condition-case nil (progn ...) (error nil)) (let (... message-log-max) (eask-setup-paths)) (let* (... ... ...) (run-hooks ...) (run-hooks ...) (let ... ... ... ...) (setq eask--elsa-version ...) (require ...) (let* ... ...) (run-hooks ...) (run-hooks ...)))))))
  (let ((default-directory (cond ((eask-global-p) eask-homedir) ((eask-config-p) user-emacs-directory) (t default-directory))) (alist)) (let ((--dolist-tail-- eask--command-list)) (while --dolist-tail-- (let ((cmd (car --dolist-tail--))) (setq alist (cons (cons cmd '...) alist)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq command-switch-alist (append command-switch-alist alist)) (eask--handle-global-options) (cond ((or (eask-global-p) (eask-special-p)) (let* ((user-emacs-directory (expand-file-name (concat ".eask/" emacs-version "/") (concat eask-homedir "../"))) (package-user-dir (expand-file-name "elpa" user-emacs-directory)) (early-init-file (locate-user-emacs-file "early-init.el")) (user-init-file (locate-user-emacs-file "init.el")) (custom-file (locate-user-emacs-file "custom.el"))) (let ((eask--first-init-p (not ...))) (if (eask--reach-verbosity-p 'debug) (progn (if ... ... ...) (message "")) (let (... message-log-max) (if ... ... ...) (message ""))) (package-activate-all) (condition-case nil (progn (make-directory package-user-dir t)) (error nil)) (let* ((command ...) (before ...) (after ...)) (run-hooks 'eask-before-command-hook) (run-hooks (intern before)) (let (... ... ...) (let ... ...) (if added ...) (eask-package-install ...)) (setq eask--elsa-version (eask-package--version-string ...)) (require 'elsa) (let* (... ...) (cond ... ... ...)) (run-hooks (intern after)) (run-hooks 'eask-after-command-hook))))) ((eask-config-p) (let ((inhibit-config (eask-quick-p))) (if (eask--reach-verbosity-p 'debug) (progn (if (eask-file-try-load "./") (eask-msg "✓ Loading config Eask file in %s... done!" eask-file) (eask-msg "✗ Loading config Eask file... missing!")) (message "")) (let ((inhibit-message t) message-log-max) (if (eask-file-try-load "./") (eask-msg "✓ Loading config Eask file in %s... done!" eask-file) (eask-msg "✗ Loading config Eask file... missing!")) (message ""))) (package-activate-all) (if eask-elapsed-time (let ((now ...)) (condition-case nil (progn ...) (error nil)) (if (eask--reach-verbosity-p ...) (progn ...) (let ... ...)) (let (...) (if ... ... ... ...))) (condition-case nil (progn (eask-write ...)) (error nil)) (if (eask--reach-verbosity-p 'all) (progn (if inhibit-config nil ... ... ...)) (let (... message-log-max) (if inhibit-config nil ... ... ...))) (condition-case nil (progn (eask-msg ...)) (error nil))) (let* ((command (eask-command)) (before (concat "eask-before-" command "-hook")) (after (concat "eask-after-" command "-hook"))) (run-hooks 'eask-before-command-hook) (run-hooks (intern before)) (let ((package-archives package-archives) (archives ...) (added)) (let (...) (while --dolist-tail-- ...)) (if added (progn ...)) (eask-package-install 'elsa)) (setq eask--elsa-version (eask-package--version-string 'elsa)) (require 'elsa) (let* ((patterns ...) (files ...)) (cond (files ... ... ... ...) (patterns ... ...) (t ... ... ...))) (run-hooks (intern after)) (run-hooks 'eask-after-command-hook)))) (t (let* ((user-emacs-directory (expand-file-name (concat ".eask/" emacs-version "/") nil)) (package-user-dir (expand-file-name "elpa" user-emacs-directory)) (early-init-file (locate-user-emacs-file "early-init.el")) (user-init-file (locate-user-emacs-file "init.el")) (custom-file (locate-user-emacs-file "custom.el"))) (let ((eask--first-init-p (not ...))) (if (eask--reach-verbosity-p 'debug) (progn (if ... ... ...) (message "")) (let (... message-log-max) (if ... ... ...) (message ""))) (if (not eask-file) (eask-help "core/init") (package-activate-all) (condition-case nil (progn ...) (error nil)) (let (... message-log-max) (eask-setup-paths)) (let* (... ... ...) (run-hooks ...) (run-hooks ...) (let ... ... ... ...) (setq eask--elsa-version ...) (require ...) (let* ... ...) (run-hooks ...) (run-hooks ...))))))))
  (let ((argv (eask-args)) load-file-name buffer-file-name) (let ((default-directory (cond ((eask-global-p) eask-homedir) ((eask-config-p) user-emacs-directory) (t default-directory))) (alist)) (let ((--dolist-tail-- eask--command-list)) (while --dolist-tail-- (let ((cmd (car --dolist-tail--))) (setq alist (cons (cons cmd ...) alist)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq command-switch-alist (append command-switch-alist alist)) (eask--handle-global-options) (cond ((or (eask-global-p) (eask-special-p)) (let* ((user-emacs-directory (expand-file-name ... ...)) (package-user-dir (expand-file-name "elpa" user-emacs-directory)) (early-init-file (locate-user-emacs-file "early-init.el")) (user-init-file (locate-user-emacs-file "init.el")) (custom-file (locate-user-emacs-file "custom.el"))) (let ((eask--first-init-p ...)) (if (eask--reach-verbosity-p ...) (progn ... ...) (let ... ... ...)) (package-activate-all) (condition-case nil (progn ...) (error nil)) (let* (... ... ...) (run-hooks ...) (run-hooks ...) (let ... ... ... ...) (setq eask--elsa-version ...) (require ...) (let* ... ...) (run-hooks ...) (run-hooks ...))))) ((eask-config-p) (let ((inhibit-config (eask-quick-p))) (if (eask--reach-verbosity-p 'debug) (progn (if ... ... ...) (message "")) (let (... message-log-max) (if ... ... ...) (message ""))) (package-activate-all) (if eask-elapsed-time (let (...) (condition-case nil ... ...) (if ... ... ...) (let ... ...)) (condition-case nil (progn ...) (error nil)) (if (eask--reach-verbosity-p ...) (progn ...) (let ... ...)) (condition-case nil (progn ...) (error nil))) (let* ((command ...) (before ...) (after ...)) (run-hooks 'eask-before-command-hook) (run-hooks (intern before)) (let (... ... ...) (let ... ...) (if added ...) (eask-package-install ...)) (setq eask--elsa-version (eask-package--version-string ...)) (require 'elsa) (let* (... ...) (cond ... ... ...)) (run-hooks (intern after)) (run-hooks 'eask-after-command-hook)))) (t (let* ((user-emacs-directory (expand-file-name ... nil)) (package-user-dir (expand-file-name "elpa" user-emacs-directory)) (early-init-file (locate-user-emacs-file "early-init.el")) (user-init-file (locate-user-emacs-file "init.el")) (custom-file (locate-user-emacs-file "custom.el"))) (let ((eask--first-init-p ...)) (if (eask--reach-verbosity-p ...) (progn ... ...) (let ... ... ...)) (if (not eask-file) (eask-help "core/init") (package-activate-all) (condition-case nil ... ...) (let ... ...) (let* ... ... ... ... ... ... ... ... ...))))))))
  (if eask--initialized-p (progn (let ((package-archives package-archives) (archives (eask-listify "melpa")) (added)) (let ((--dolist-tail-- archives)) (while --dolist-tail-- (let ((archive ...)) (if (assoc archive package-archives) nil (setq added t) (if eask-elapsed-time ... ... ... ...)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (if added (progn (if eask-elapsed-time (let (...) (condition-case nil ... ...) (let ... ...) (let ... ...)) (condition-case nil (progn ...) (error nil)) (let (... message-log-max) (eask-pkg-init t)) (condition-case nil (progn ...) (error nil))))) (eask-package-install 'elsa)) (setq eask--elsa-version (eask-package--version-string 'elsa)) (require 'elsa) (let* ((patterns (eask-args)) (files (if patterns (eask-expand-file-specs patterns) (eask-package-el-files)))) (cond (files (elsa-load-config) (mapcar #'eask--elsa-analyse-file files) (eask-msg "") (eask-info "(Total of %s file%s linted)" (length files) (eask--sinr files "" "s"))) (patterns (eask-msg "") (eask-info "(No files match wildcard: %s)" (mapconcat #'identity patterns " "))) (t (eask-msg "") (eask-info "(No files have been linted)") (eask-help "lint/elsa"))))) (setq eask--initialized-p t) (let ((argv (eask-args)) load-file-name buffer-file-name) (let ((default-directory (cond ((eask-global-p) eask-homedir) ((eask-config-p) user-emacs-directory) (t default-directory))) (alist)) (let ((--dolist-tail-- eask--command-list)) (while --dolist-tail-- (let ((cmd ...)) (setq alist (cons ... alist)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq command-switch-alist (append command-switch-alist alist)) (eask--handle-global-options) (cond ((or (eask-global-p) (eask-special-p)) (let* ((user-emacs-directory ...) (package-user-dir ...) (early-init-file ...) (user-init-file ...) (custom-file ...)) (let (...) (if ... ... ...) (package-activate-all) (condition-case nil ... ...) (let* ... ... ... ... ... ... ... ... ...)))) ((eask-config-p) (let ((inhibit-config ...)) (if (eask--reach-verbosity-p ...) (progn ... ...) (let ... ... ...)) (package-activate-all) (if eask-elapsed-time (let ... ... ... ...) (condition-case nil ... ...) (if ... ... ...) (condition-case nil ... ...)) (let* (... ... ...) (run-hooks ...) (run-hooks ...) (let ... ... ... ...) (setq eask--elsa-version ...) (require ...) (let* ... ...) (run-hooks ...) (run-hooks ...)))) (t (let* ((user-emacs-directory ...) (package-user-dir ...) (early-init-file ...) (user-init-file ...) (custom-file ...)) (let (...) (if ... ... ...) (if ... ... ... ... ... ...))))))))
  (if eask-loading-file-p nil (if eask--initialized-p (progn (let ((package-archives package-archives) (archives (eask-listify "melpa")) (added)) (let ((--dolist-tail-- archives)) (while --dolist-tail-- (let (...) (if ... nil ... ...) (setq --dolist-tail-- ...)))) (if added (progn (if eask-elapsed-time (let ... ... ... ...) (condition-case nil ... ...) (let ... ...) (condition-case nil ... ...)))) (eask-package-install 'elsa)) (setq eask--elsa-version (eask-package--version-string 'elsa)) (require 'elsa) (let* ((patterns (eask-args)) (files (if patterns (eask-expand-file-specs patterns) (eask-package-el-files)))) (cond (files (elsa-load-config) (mapcar #'eask--elsa-analyse-file files) (eask-msg "") (eask-info "(Total of %s file%s linted)" (length files) (eask--sinr files "" "s"))) (patterns (eask-msg "") (eask-info "(No files match wildcard: %s)" (mapconcat ... patterns " "))) (t (eask-msg "") (eask-info "(No files have been linted)") (eask-help "lint/elsa"))))) (setq eask--initialized-p t) (let ((argv (eask-args)) load-file-name buffer-file-name) (let ((default-directory (cond (... eask-homedir) (... user-emacs-directory) (t default-directory))) (alist)) (let ((--dolist-tail-- eask--command-list)) (while --dolist-tail-- (let (...) (setq alist ...) (setq --dolist-tail-- ...)))) (setq command-switch-alist (append command-switch-alist alist)) (eask--handle-global-options) (cond ((or (eask-global-p) (eask-special-p)) (let* (... ... ... ... ...) (let ... ... ... ... ...))) ((eask-config-p) (let (...) (if ... ... ...) (package-activate-all) (if eask-elapsed-time ... ... ... ...) (let* ... ... ... ... ... ... ... ... ...))) (t (let* (... ... ... ... ...) (let ... ... ...))))))))
  load-with-code-conversion("/usr/local/lib/node_modules/@emacs-eask/cli/lisp/l..." "/usr/local/lib/node_modules/@emacs-eask/cli/lisp/l..." nil t)
  command-line-1(("-scriptload" "/usr/local/lib/node_modules/@emacs-eask/cli/lisp/l..."))
  command-line()
  normal-top-level()

Any ideas how this could be fixed?

@ebpa
Copy link

ebpa commented Jun 11, 2023

I also encountered this (though running via LSP with Cask) when I've tried wiring up some of my own packages with Elsa. I'm wholly unfamiliar with the internals of Elsa, but it appears that it's choking on analyzing the defining-kbd-macro variable reference within the undefiend function in subr.el. I haven't yet figured out the issue with elsa/cask for my own packages, but I did notice that my local Elsa repo had a populated .elsa cache and succeeds in static analysis of itself. Once I copied Elsa's .elsa cache (containing subr, etc.) into the project that was experiencing the failure above, it started working.

@jcs090218
Copy link
Contributor

When trying to run eask lint elsa first received errors about missing dependencies async and lgr.

It's weird. It seems like melpa doesn't recognize the new dependencies from elsa. See https://melpa.org/#/elsa. It's missing ansi, lgr, and async. 🤔

Elsa/elsa.el

Line 9 in 2aa912d

;; Package-Requires: ((emacs "26.1") (trinary "0") (f "0") (dash "2.14") (cl-lib "0.3") (lsp-mode "0") (ansi "0") (async "1.9.7") (lgr "0.1.0"))

cc @tarsius Do you know why?

@Fuco1
Copy link
Member

Fuco1 commented Jun 12, 2023

This is most likely not Eask related and there is simply some code that Elsa chokes on. It still happens quite often as it's hard to get all the edge-cases accounted for.

What is your exact versions of Emacs? Since the source can be different between each commit, ideally maybe upload your subr.el somewhere exactly as it appears on your system so I can try to run it locally and see what happens.

@tarsius
Copy link

tarsius commented Jun 12, 2023

cc @tarsius Do you know why?

elsa-pkg.el is checked into git but contains outdated dependency information.

Package-Build uses NAME-pkg.el if it exists.

@ebpa
Copy link

ebpa commented Jun 12, 2023

@Fuco1 Emacs 28.1.91 undefined:

(defun undefined ()
  "Beep to tell the user this binding is undefined."
  (declare (completion ignore))
  (interactive)
  (ding)
  (if defining-kbd-macro
      (error "%s is undefined" (key-description (this-single-command-keys)))
    (message "%s is undefined" (key-description (this-single-command-keys))))
  (force-mode-line-update)
  ;; If this is a down-mouse event, don't reset prefix-arg;
  ;; pass it to the command run by the up event.
  (setq prefix-arg
        (when (memq 'down (event-modifiers last-command-event))
          current-prefix-arg)))

@smeagol74
Copy link
Author

This is most likely not Eask related and there is simply some code that Elsa chokes on. It still happens quite often as it's hard to get all the edge-cases accounted for.

Yep, you are right, It's most probably because of some code that Elsa can not properly understand. But should Elsa just fail to continue in such cases? I think it would be better if Elsa mark some libraries as 'broken' and skip them in further processing instead. I propose Elsa to catch such exceptions and mark such 'bad' libraries somehow and continue to work with collected information ignoring 'broken' libraries.

What is your exact versions of Emacs? Since the source can be different between each commit, ideally maybe upload your subr.el somewhere exactly as it appears on your system so I can try to run it locally and see what happens.

My exact version of Emacs is brew installed emacs-plus@28/28.2 on MacOS.

My subr.el can be found in this gist

Thank you.

@Fuco1
Copy link
Member

Fuco1 commented Jun 21, 2023

Yep, you are right, It's most probably because of some code that Elsa can not properly understand. But should Elsa just fail to continue in such cases? I think it would be better if Elsa mark some libraries as 'broken' and skip them in further processing instead. I propose Elsa to catch such exceptions and mark such 'bad' libraries somehow and continue to work with collected information ignoring 'broken' libraries.

This is indeed the idea and there is some level of error handling. The two main issues are: reader issues where there is some weird syntax that Elsa cannot parse. This is usually what causes a crash.

Another issue is straight up bugs in Elsa itself, so that we actually have ie type errors in our code 😊 Each analysed form should be wrapped with try-catch.

The OP error in fact points to a problem with Elsa itself, since it says Debugger entered--Lisp error: (void-variable mixed), where mixed is one of the Elsa types.

The weirder thing still is that I tried the subr code and it passed on my version, but it might be slightly different.

One other thing you can try is to delete the .elsa folder if it exists, that's where we keep the cache with intermediate analysis results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants