drym-org / symex.el

An intuitive way to edit Lisp symbolic expressions ("symexes") structurally in Emacs
Other
271 stars 22 forks source link

"Error: Wrong type argument stringp" in Emacs 29.1 #130

Open zilti opened 8 months ago

zilti commented 8 months ago

The automatic compilation from Emacs seems to trigger some warnings that pop up every time I start Emacs:

⛔ Warning (comp): /home/zilti/.emacs.d/elpaca/builds/symex/symex-interface-arc.el: Error: Wrong type argument stringp
⛔ Warning (comp): /home/zilti/.emacs.d/elpaca/builds/symex/symex-interface-common-lisp.el: Error: Wrong type argument stringp
⛔ Warning (comp): /home/zilti/.emacs.d/elpaca/builds/symex/symex-interface-scheme.el: Error: Wrong type argument stringp
⛔ Warning (comp): /home/zilti/.emacs.d/elpaca/builds/symex/symex-interface-racket.el: Error: Wrong type argument stringp
⛔ Warning (comp): /home/zilti/.emacs.d/elpaca/builds/symex/symex-interface-elisp.el: Error: Wrong type argument stringp
⛔ Warning (comp): /home/zilti/.emacs.d/elpaca/builds/symex/symex-interop.el: Error: Wrong type argument stringp
⛔ Warning (comp): /home/zilti/.emacs.d/elpaca/builds/symex/symex-interface-clojure.el: Error: Wrong type argument stringp
⛔ Warning (comp): /home/zilti/.emacs.d/elpaca/builds/symex/symex-transformations-lisp.el: Error: Wrong type argument stringp
⛔ Warning (comp): /home/zilti/.emacs.d/elpaca/builds/symex/symex-misc.el: Error: Wrong type argument stringp
⛔ Warning (comp): /home/zilti/.emacs.d/elpaca/builds/symex/symex-transformations.el: Error: Wrong type argument stringp
countvajhula commented 8 months ago

What version of Emacs are you on? Could you try reproducing it with emacs -Q, something like:

  1. Add to example.el:
    
    (require 'package)
    (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
    (package-initialize)

(use-package symex :ensure t :config (symex-initialize) :bind ("s-;" . symex-mode-interface))



2. Run `emacs -Q --load example.el`

(steps adapted from #88 )
zilti commented 8 months ago

I'm on Emacs 29.1.

Here's the symex-specific output when running emacs -Q --load example.el:

 ■  Warning (comp): symex-computations.el:55:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
 ■  Warning (comp): lispy.el:394:2: Warning: docstring wider than 80 characters
 ■  Warning (comp): lispy.el:828:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
 ■  Warning (comp): lispy.el:882:2: Warning: value returned from (> i 0) is unused
 ■  Warning (comp): lispy.el:882:2: Warning: value returned from (> i 0) is unused
 ■  Warning (comp): lispy.el:882:2: Warning: value returned from (> i 0) is unused
 ■  Warning (comp): lispy.el:882:2: Warning: value returned from (> i 0) is unused
 ■  Warning (comp): lispy.el:882:2: Warning: value returned from (> i 0) is unused
 ■  Warning (comp): lispy.el:949:2: Warning: value returned from (> i 0) is unused
 ■  Warning (comp): lispy.el:949:2: Warning: value returned from (> i 0) is unused
 ■  Warning (comp): lispy.el:949:2: Warning: value returned from (> i 0) is unused
 ■  Warning (comp): lispy.el:949:2: Warning: value returned from (> i 0) is unused
 ■  Warning (comp): lispy.el:949:2: Warning: value returned from (> i 0) is unused
 ■  Warning (comp): lispy.el:2294:2: Warning: value returned from (> i 0) is unused
 ■  Warning (comp): lispy.el:2294:2: Warning: value returned from (> i 0) is unused
 ■  Warning (comp): lispy.el:2512:2: Warning: value returned from (> i 0) is unused
 ■  Warning (comp): lispy.el:2512:2: Warning: value returned from (> i 0) is unused
 ■  Warning (comp): lispy.el:2569:2: Warning: docstring wider than 80 characters
 ■  Warning (comp): lispy.el:2587:2: Warning: docstring wider than 80 characters
 ■  Warning (comp): symex-dsl.el:221:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
 ■  Warning (comp): lispy.el:3159:2: Warning: value returned from (> i 0) is unused
 ■  Warning (comp): lispy.el:3285:2: Warning: value returned from (> i 0) is unused
 ■  Warning (comp): lispy.el:3285:2: Warning: value returned from (> i 0) is unused
 ■  Warning (comp): lispy.el:3531:2: Warning: docstring wider than 80 characters
 ■  Warning (comp): lispy.el:4294:4: Warning: Doc string after `interactive'
 ■  Warning (comp): lispy.el:4314:4: Warning: Doc string after `interactive'
 ■  Warning (comp): lispy.el:4745:33: Warning: ‘point-at-bol’ is an obsolete function (as of 29.1); use ‘line-beginning-position’ or ‘pos-bol’ instead.
 ■  Warning (comp): lispy.el:4745:48: Warning: ‘point-at-eol’ is an obsolete function (as of 29.1); use ‘line-end-position’ or ‘pos-eol’ instead.
 ■  Warning (comp): symex-evaluator.el:38:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
 ■  Warning (comp): lispy.el:5074:10: Warning: ‘org-flag-region’ is an obsolete function (as of 9.6); use ‘org-fold-region’ instead.
 ■  Warning (comp): lispy.el:5511:2: Warning: value returned from (> i 0) is unused
 ■  Warning (comp): lispy.el:6401:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
 ■  Warning (comp): lispy.el:6976:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
 ■  Warning (comp): lispy.el:8342:20: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1).
 ■  Warning (comp): lispy.el:8567:33: Warning: ‘global-edebug-map’ is an obsolete variable (as of 28.1); use ‘edebug-global-map’ instead.
 ■  Warning (comp): lispy.el:9011:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
 ■  Warning (comp): lispy.el:9727:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
 ■  Warning (comp): lispy.el:7967:17: Warning: the function ‘semantic-current-tag’ might not be defined at runtime.
 ■  Warning (comp): lispy.el:5873:16: Warning: the function ‘lispy--eval-python-plain’ is not known to be defined.
 ■  Warning (comp): lispy.el:5074:10: Warning: the function ‘org-flag-region’ might not be defined at runtime.
 ■  Warning (comp): lispy.el:4642:5: Warning: the function ‘ivy-read’ is not known to be defined.
 ■  Warning (comp): lispy.el:4405:20: Warning: the function ‘ansi-color-apply’ might not be defined at runtime.
 ■  Warning (comp): lispy.el:2260:8: Warning: the function ‘iedit-mode’ might not be defined at runtime.
 ■  Warning (comp): lispy.el:2117:9: Warning: the function ‘comint-send-input’ might not be defined at runtime.
 ■  Warning (comp): lispy.el:1054:21: Warning: the function ‘ring-remove’ might not be defined at runtime.
 ■  Warning (comp): lispy.el:1037:14: Warning: the function ‘ring-insert’ might not be defined at runtime.
 ■  Warning (comp): lispy.el:1024:18: Warning: the function ‘ring-ref’ might not be defined at runtime.
 ■  Warning (comp): lispy.el:1022:26: Warning: the function ‘ring-length’ might not be defined at runtime.
 ■  Warning (comp): lispy.el:428:18: Warning: the function ‘comint-filename-completion’ might not be defined at runtime.
 ■  Warning (comp): lispy.el:427:6: Warning: the function ‘comint-mode’ might not be defined at runtime.
 ■  Warning (comp): evil-cleverparens.el:1042:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
 ■  Warning (comp): evil-cleverparens.el:1051:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
 ■  Warning (comp): evil-cleverparens.el:1061:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
 ■  Warning (comp): symex-evil.el:61:25: Warning: ‘evil-repeat-type’ is an obsolete function (as of 1.15.0); use ‘evil--repeat-type’ instead.
 ■  Warning (comp): symex-evil.el:87:25: Warning: ‘evil-repeat-type’ is an obsolete function (as of 1.15.0); use ‘evil--repeat-type’ instead.
 ■  Warning (comp): symex-data.el:36:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
 ■  Warning (comp): symex-data.el:108:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
 ■  Warning (comp): symex-primitives-lisp.el:196:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
 ■  Warning (comp): symex-primitives-lisp.el:213:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
 ■  Warning (comp): symex-primitives-lisp.el:273:14: Warning: the function ‘symex--point-at-start-p’ is not known to be defined.
 ■  Warning (comp): symex-transformations-ts.el:76:9: Warning: reference to free variable ‘symex-ts--current-node’
 ■  Warning (comp): symex-transformations-ts.el:120:2: Warning: reference to free variable ‘symex-highlight-p’
 ■  Warning (comp): symex-transformations-ts.el:195:2: Warning: reference to free variable ‘symex-highlight-p’
 ■  Warning (comp): symex-transformations-ts.el:227:9: Warning: reference to free variable ‘symex-ts--current-node’
 ■  Warning (comp): symex-transformations-ts.el:193:6: Warning: the function ‘evil-append-line’ is not known to be defined.
 ■  Warning (comp): symex-transformations-ts.el:191:6: Warning: the function ‘evil-previous-line’ is not known to be defined.
 ■  Warning (comp): symex-transformations-ts.el: Warning: the function ‘symex--update-overlay’ is not known to be defined.
 ■  Warning (comp): symex-transformations-ts.el:117:10: Warning: the function ‘symex-ts--delete-current-line-if-empty’ is not known to be defined.
 ■  Warning (comp): symex-transformations-ts.el:103:8: Warning: the function ‘symex-ts-set-current-node-from-point’ is not known to be defined.
 ■  Warning (comp): symex-transformations-ts.el:96:27: Warning: the function ‘symex-ts--get-nth-sibling-from-node’ is not known to be defined.
 ■  Warning (comp): symex-transformations-ts.el:92:19: Warning: the function ‘symex-ts-get-current-node’ is not known to be defined.
 ■  Warning (comp): symex-transformations-ts.el:90:10: Warning: the function ‘symex-tree-sitter-p’ is not known to be defined.
 ■  Warning (comp): symex-transformations-ts.el:72:4: Warning: the function ‘evil-insert-state’ is not known to be defined.
 ■  Warning (comp): symex-ts.el:113:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
 ■  Warning (comp): symex-ts.el:127:15: Warning: reference to free variable ‘symex--move-zero’
 ■  Warning (comp): symex-ts.el:233:60: Warning: the function ‘symex-make-move’ is not known to be defined.
 ■  Warning (comp): symex-ts.el:139:17: Warning: the function ‘symex--are-moves-equal-p’ is not known to be defined.
 ■  Warning (comp): symex-ts.el:132:23: Warning: the function ‘symex--add-moves’ is not known to be defined.
 ■  Warning (comp): symex-ui.el:49:30: Warning: the function ‘symex--get-end-point’ is not known to be defined.
 ■  Warning (comp): symex-ui.el:48:30: Warning: the function ‘symex--get-starting-point’ is not known to be defined.
 ■  Warning (comp): symex-primitives.el:209:4: Warning: the function ‘symex--delete-overlay’ is not known to be defined.
 ■  Warning (comp): /home/zilti/.config/emacs/elpa/symex-20230322.2003/symex-interop.el: Error: Wrong type argument stringp
 ■  Warning (comp): /home/zilti/.config/emacs/elpa/symex-20230322.2003/symex-interface-elisp.el: Error: Wrong type argument stringp
 ■  Warning (comp): /home/zilti/.config/emacs/elpa/symex-20230322.2003/symex-interface-racket.el: Error: Wrong type argument stringp
 ■  Warning (comp): /home/zilti/.config/emacs/elpa/symex-20230322.2003/symex-interface-clojure.el: Error: Wrong type argument stringp
 ■  Warning (comp): /home/zilti/.config/emacs/elpa/symex-20230322.2003/symex-interface-scheme.el: Error: Wrong type argument stringp
 ■  Warning (comp): /home/zilti/.config/emacs/elpa/symex-20230322.2003/symex-interface-arc.el: Error: Wrong type argument stringp
 ■  Warning (comp): /home/zilti/.config/emacs/elpa/symex-20230322.2003/symex-interface-common-lisp.el: Error: Wrong type argument stringp
 ■  Warning (comp): symex-utils.el:107:44: Warning: reference to free variable ‘symex--traversal-goto-last’
 ■  Warning (comp): symex-utils.el:107:20: Warning: the function ‘symex-execute-traversal’ is not known to be defined.
 ■  Warning (comp): symex-utils.el:106:4: Warning: the function ‘symex-save-excursion’ is not known to be defined.
 ■  Warning (comp): /home/zilti/.config/emacs/elpa/symex-20230322.2003/symex-misc.el: Error: Wrong type argument stringp
 ■  Warning (comp): /home/zilti/.config/emacs/elpa/symex-20230322.2003/symex-transformations-lisp.el: Error: Wrong type argument stringp
 ■  Warning (comp): /home/zilti/.config/emacs/elpa/symex-20230322.2003/symex-transformations.el: Error: Wrong type argument stringp
countvajhula commented 5 months ago

Great, thanks for the detailed report! I'm returning to working on Symex in the coming weeks and will look into this soon.

Doodler8888 commented 4 months ago

I have the same errors (29.3)

countvajhula commented 4 months ago

@zilti @Doodler8888 If you M-x toggle-debug-on-error and then load Symex again (or restart Emacs), does it show a stack trace for the error? Otherwise, running emacs --debug-init in a shell should give us a stacktrace. Please let me know what you find.

Doodler8888 commented 4 months ago

Since my last comment, i've changed my emacs configuration considerably. The most noticeable changes are going to the main branch instead of 29.3 and changing elpaca in favor of straight because elpaca started giving me compilation errors on other packages. After your answer i've tried to reinstall symex again and now i don't get the errors. I suppose it might be something with elpaca. But i haven't tried to trace or debug anything, so i don't really know what helped me.

@zilti @Doodler8888 If you M-x toggle-debug-on-error and then load Symex again (or restart Emacs), does it show a stack trace for the error? Otherwise, running emacs --debug-init in a shell should give us a stacktrace. Please let me know what you find.

countvajhula commented 4 months ago

Thanks for checking! @zilti How about you, I notice your errors also mention elpaca. Any chance you're still seeing the error?