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

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

Open
zilti opened this issue Dec 14, 2023 · 10 comments
Open

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

zilti opened this issue Dec 14, 2023 · 10 comments

Comments

@zilti
Copy link

zilti commented Dec 14, 2023

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
Copy link
Collaborator

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))
  1. Run emacs -Q --load example.el

(steps adapted from #88 )

@zilti
Copy link
Author

zilti commented Dec 14, 2023

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
Copy link
Collaborator

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

@Doodler8888
Copy link

Doodler8888 commented Apr 9, 2024

I have the same errors (29.3)

@countvajhula
Copy link
Collaborator

@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
Copy link

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
Copy link
Collaborator

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

@TamsynUlthara
Copy link

I'm seeing these errors with Symex (including with the minimal emacs -Q setup), FWIW.

I'm running Emacs 29.4 under Arch Linux.

@TamsynUlthara
Copy link

This minimal config fixes the issue for me (although likely not the underlying cause):

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

(use-package symex
  :ensure t
  :init
  (add-to-list
   'native-comp-jit-compilation-deny-list
   "/symex-")
  :config (symex-initialize)
  :bind ("s-;" . symex-mode-interface))

@countvajhula
Copy link
Collaborator

Thanks for reporting @TamsynUlthara ! Is it only Warning (comp) that you're seeing or is the functionality also broken? If the functionality is broken, there may be other error messages in your log, something like Error (use-package) -- see any of those?

I recently commented on another issue regarding these warnings, I'll quote that here for context:

I think the presence of the native compilation warnings and errors is an indication that there are still technically some missing imports, but if those modules happen to have already been loaded by Emacs in the course of loading some other module, the omission doesn't end up causing any problems in practice -- hopefully that will be the case for you. I'd like to fix the errors and warnings for real, but resolving some of them may be a bit fiddly, and if possible I'd like to avoid doing it on the main branch in favor of just fixing the problem on the #71 branch which I hope to merge in the near future. Of course, if you're still facing problems, I'm happy to fix it on the main branch!

Another thing is, these byte compilation warnings don't provide a lot of information on tracking the source of the error. E.g. in the wrong type argument stringp, there's no hint of a line number or function where it's encountering that problem. I'd love to find a way to get more clues if anyone has any pointers here. Otherwise, when I get around to fixing these, I'll just use the standard approach of "bisecting" (i.e. commenting out portions "binary search" style and restarting Emacs each time) to identify the source of the error, which is annoying but should get us there.

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

No branches or pull requests

4 participants