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

ERR on (symex-initialize): "unsupported system-type berkeley-unix" #150

Open
Izder456 opened this issue Feb 7, 2025 · 3 comments
Open

Comments

@Izder456
Copy link

Izder456 commented Feb 7, 2025

I am on OpenBSD, although I presume this to also be the case on other *BSDs.

Why is this package OS-dependent? Its just binds.

Image

Please fix this.

@Izder456 Izder456 changed the title ERR on (symex-initialized): "unsupported system-type berkeley unix" ERR on (symex-initialize): "unsupported system-type berkeley unix" Feb 7, 2025
@Izder456 Izder456 changed the title ERR on (symex-initialize): "unsupported system-type berkeley unix" ERR on (symex-initialize): "unsupported system-type berkeley-unix" Feb 7, 2025
@Izder456 Izder456 closed this as completed Feb 7, 2025
@Izder456 Izder456 reopened this Feb 7, 2025
@Izder456
Copy link
Author

Izder456 commented Feb 7, 2025

from M-x toggle-debug-on-error after running (symex-initialize) in ielm:

Debugger entered--Lisp error: (error "Invalid version syntax: ‘[email protected]’...")
  signal(error ("Invalid version syntax: ‘[email protected]’..."))
  error("Invalid version syntax: `%s' (must start with a nu..." "[email protected]")
  version-to-list("[email protected]")
  version<=("0.18.0" "[email protected]")
  tsc-dyn-get-ensure("0.18.0")
  byte-code("\301\302!\210\303\10!\210\301\304!\210\301\305!\207" [tsc--dyn-version require tsc-dyn-get tsc-dyn-get-ensure tsc-dyn seq] 2)
  require(tsc)
  eval-buffer(#<buffer  *load*-135057> nil "/home/izder456/.emacs.d/elpaca/builds/tree-sitter/..." nil t)  ; Reading at buffer position 783
  load-with-code-conversion("/home/izder456/.emacs.d/elpaca/builds/tree-sitter/..." "/home/izder456/.emacs.d/elpaca/builds/tree-sitter/..." nil t)
  require(tree-sitter)
  eval-buffer(#<buffer  *load*-562027> nil "/home/izder456/.emacs.d/elpaca/builds/symex/symex-..." nil t)  ; Reading at buffer position 1323
  load-with-code-conversion("/home/izder456/.emacs.d/elpaca/builds/symex/symex-..." "/home/izder456/.emacs.d/elpaca/builds/symex/symex-..." nil t)
  require(symex-ts)
  eval-buffer(#<buffer  *load*-8287> nil "/home/izder456/.emacs.d/elpaca/builds/symex/symex-..." nil t)  ; Reading at buffer position 1412
  load-with-code-conversion("/home/izder456/.emacs.d/elpaca/builds/symex/symex-..." "/home/izder456/.emacs.d/elpaca/builds/symex/symex-..." nil t)
  require(symex-primitives)
  eval-buffer(#<buffer  *load*-4315> nil "/home/izder456/.emacs.d/elpaca/builds/symex/symex-..." nil t)  ; Reading at buffer position 1084
  load-with-code-conversion("/home/izder456/.emacs.d/elpaca/builds/symex/symex-..." "/home/izder456/.emacs.d/elpaca/builds/symex/symex-..." nil t)
  require(symex-misc)
  eval-buffer(#<buffer  *load*-455691> nil "/home/izder456/.emacs.d/elpaca/builds/symex/symex-..." nil t)  ; Reading at buffer position 1086
  load-with-code-conversion("/home/izder456/.emacs.d/elpaca/builds/symex/symex-..." "/home/izder456/.emacs.d/elpaca/builds/symex/symex-..." nil t)
  require(symex-hydra)
  eval-buffer(#<buffer  *load*> nil "/home/izder456/.emacs.d/elpaca/builds/symex/symex...." nil t)  ; Reading at buffer position 2144
  load-with-code-conversion("/home/izder456/.emacs.d/elpaca/builds/symex/symex...." "/home/izder456/.emacs.d/elpaca/builds/symex/symex...." nil t)
  (symex-initialize)
  eval((symex-initialize) t)
  ielm-eval-input(#("(symex-initialize)" 0 18 (rear-nonsticky t font-lock-face rainbow-blocks-depth-1-face fontified t)) nil)
  ielm-send-input(nil)
  ielm-return()
  funcall-interactively(ielm-return)
  call-interactively(ielm-return nil nil)
  command-execute(ielm-return)

why is this trying to start treesitter?

@countvajhula
Copy link
Collaborator

Hi there, I'm sorry you're facing a weird issue!

Looking at that stack trace, the error seems to be coming from the tsc package, which is a dependency of Symex in order to support tree-sitter prior to Emacs 29.

This part of the stack trace tells us the mechanism of the bug:

signal(error ("Invalid version syntax: ‘[email protected]’..."))
  error("Invalid version syntax: `%s' (must start with a nu..." "[email protected]")
  version-to-list("[email protected]")
  version<=("0.18.0" "[email protected]")
  tsc-dyn-get-ensure("0.18.0")
  byte-code("\301\302!\210\303\10!\210\301\304!\210\301\305!\207" [tsc--dyn-version require tsc-dyn-get tsc-dyn-get-ensure tsc-dyn seq] 2)
  require(tsc)

When the tsc package is required, it attempts to do some kind of version check using Emacs's built-in version<= utility, I believe, to ensure that the installed version (second argument) is 0.18.0 (first argument) or greater. Looks like this utility is being passed an invalid version string, for some reason. The error message suggests it is expecting a numeric version string like "0.18.0". Instead it is getting "[email protected]". Looking at the tsc source code, I see this line that appears to suggest that your system may not be supported.

Depending on how motivated you are, there are a few options I can see, but none are especially great. Assuming you only want to use Symex with Lisp code (and not something like python which would require tree-sitter), then you could do one of the following:

  1. Use an old version of Symex before tree-sitter support was added. I just retroactively tagged the last commit prior to adding tree-sitter as 1.1, so you could try that and see how it goes. Otherwise, 1.0 may be more reliable as I'm sure I would have tested it prior to tagging it, back then.
  2. Otherwise, if you want to use the latest Symex, you could comment out all references to tsc and tree-sitter in your local copy of the Symex source code, deleting modules like symex-ts.el and symex-transformations-ts.el and symex-utils-ts.el, until it works (told you the options weren't great 😄 ).
  3. Assuming you have Emacs 29 or more recent, you could wait until Symex 2.0, which will drop support for Emacs <29, and use the built-in Tree Sitter (which I suspect would support your system, but I don't know that for sure).

Hope one of those works for ya! Let me know.

@Izder456
Copy link
Author

Hi there, I'm sorry you're facing a weird issue!

Looking at that stack trace, the error seems to be coming from the tsc package, which is a dependency of Symex in order to support tree-sitter prior to Emacs 29.

This part of the stack trace tells us the mechanism of the bug:

signal(error ("Invalid version syntax: ‘[email protected]’..."))
  error("Invalid version syntax: `%s' (must start with a nu..." "[email protected]")
  version-to-list("[email protected]")
  version<=("0.18.0" "[email protected]")
  tsc-dyn-get-ensure("0.18.0")
  byte-code("\301\302!\210\303\10!\210\301\304!\210\301\305!\207" [tsc--dyn-version require tsc-dyn-get tsc-dyn-get-ensure tsc-dyn seq] 2)
  require(tsc)

When the tsc package is required, it attempts to do some kind of version check using Emacs's built-in version<= utility, I believe, to ensure that the installed version (second argument) is 0.18.0 (first argument) or greater. Looks like this utility is being passed an invalid version string, for some reason. The error message suggests it is expecting a numeric version string like "0.18.0". Instead it is getting "[email protected]". Looking at the tsc source code, I see this line that appears to suggest that your system may not be supported.

Depending on how motivated you are, there are a few options I can see, but none are especially great. Assuming you only want to use Symex with Lisp code (and not something like python which would require tree-sitter), then you could do one of the following:

I rarely write python or other languages than lisp perl or shell so this could be useful

  1. Use an old version of Symex before tree-sitter support was added. I just retroactively tagged the last commit prior to adding tree-sitter as 1.1, so you could try that and see how it goes. Otherwise, 1.0 may be more reliable as I'm sure I would have tested it prior to tagging it, back then.

luckily I use elpaca which lets me pin to git tags. i'll try this out and get back to you.

  1. Otherwise, if you want to use the latest Symex, you could comment out all references to tsc and tree-sitter in your local copy of the Symex source code, deleting modules like symex-ts.el and symex-transformations-ts.el and symex-utils-ts.el, until it works (told you the options weren't great 😄 ).

yeah no. thats gross lol.

  1. Assuming you have Emacs 29 or more recent, you could wait until Symex 2.0, which will drop support for Emacs <29, and use the built-in Tree Sitter (which I suspect would support your system, but I don't know that for sure).

I think i'll stick with option 1 until this version releases if option 1 works for me. thanks for the heads up!

Hope one of those works for ya! Let me know.

yeah no problem.

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

2 participants