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

emacsql error on install with use package from melpa: Symbol’s value as variable is void: emacsql-sqlite-reserved #108

Closed
Trevoke opened this issue Feb 17, 2023 · 5 comments

Comments

@Trevoke
Copy link

Trevoke commented Feb 17, 2023

I am on emacs 29 snapshot. Emacs was not configured without sqlite3 support (which I think means it was compiled with sqlite3 support).

My config has (use-package emacsql-sqlite-builtin :pin melpa).

When I boot emacs, I get
⛔ Error (use-package): emacsql-sqlite-builtin/:catch: Symbol’s value as variable is void: emacsql-sqlite-reserved

Error I obtain from a --debut-init with debug-on-error t :

Debugger entered--Lisp error: (void-variable emacsql-sqlite-reserved)
  byte-code("\301\302!\210\301\303!\210\304\10!\210\305\306\307\310!\"\210\305\311\312\310!\"\210\305\313\311\"\210\314\313\315\316#\210\317\310\320\311#\321\310\322\323\324$\210\325..." [emacsql-sqlite-reserved require sqlite emacsql emacsql-register-reserved defalias emacsql-sqlite-builtin-connection-p eieio-make-class-predicate emacsql-sqlite-builtin-connection emacsql-sqlite-builtin-connection--eieio-childp eieio-make-child-predicate emacsql-sqlite-builtin-connection-child-p make-obsolete "use (cl-typep ... 'emacsql-sqlite-builtin-connecti..." "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (emacsql-connection) ((file :initarg :file :type (or null string) :documentation "Database file name.") (types :allocation :class :reader emacsql-types :initform '((integer "INTEGER") (float "REAL") (object "TEXT") (nil nil)))) ((:documentation "A connection to a SQLite database using builtin su...")) cl-generic-define-method emacsql-types nil ((this emacsql-sqlite-builtin-connection)) #f(compiled-function (this) "Access the slot `types' from object of class\n`emacsql-sqlite-builtin-connection'." #<bytecode -0x43245649385cb90>)] 7)
  require(emacsql-sqlite-builtin nil t)
  (not (require 'emacsql-sqlite-builtin nil t))
  (if (not (require 'emacsql-sqlite-builtin nil t)) (display-warning 'use-package (format "Cannot load %s" 'emacsql-sqlite-builtin) :error))
  (condition-case err (if (not (require 'emacsql-sqlite-builtin nil t)) (display-warning 'use-package (format "Cannot load %s" 'emacsql-sqlite-builtin) :error)) ((debug error) (funcall use-package--warning45 :catch err)))
  eval-buffer(#<buffer  *load*-719173> nil "/home/stag/.emacs.d/aldric.el" nil t)  ; Reading at buffer position 13058
  load-with-code-conversion("/home/stag/.emacs.d/aldric.el" "/home/stag/.emacs.d/aldric.el" nil nil)
  load("/home/stag/.emacs.d/aldric.el" nil nil t)
  load-file("~/.emacs.d/aldric.el")
  org-babel-load-file("~/.emacs.d/aldric.org")
  eval-buffer(#<buffer  *load*> nil "/home/stag/.emacs.d/init.el" nil t)  ; Reading at buffer position 2104
  load-with-code-conversion("/home/stag/.emacs.d/init.el" "/home/stag/.emacs.d/init.el" t t)
  load("/home/stag/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode -0x169544414983deaf>) #f(compiled-function () #<bytecode -0x1f3c61addc0b3035>) t)
  command-line()
  normal-top-level()
@tarsius
Copy link
Member

tarsius commented Feb 17, 2023

Make sure emacsql and emacsql-sqlite-builtin are up-to-date, restart Emacs and try again. Might fix it, might not.

@Trevoke
Copy link
Author

Trevoke commented Feb 17, 2023

I had installed emacsql-sqlite-builtin for the first time when this happened, so I think it's fair to suggest I was using the most recent code from MELPA build. I don't actually know how to make sure emacsql is up to date, but if it's an external dependency from emacsql-sqlite-builtin then it was also up to date.

@tarsius
Copy link
Member

tarsius commented Feb 17, 2023

I don't actually know how to make sure emacsql is up to date,

I don't use package.el, so I am not 100% sure either, but M-x package-update-all should do the trick.

but if it's an external dependency from emacsql-sqlite-builtin then it was also up to date.

I don't think you can be sure of that. Due to any version snapshot (such as 19700101) being "greater" than the version specified in emacsql.el (;; Package-Requires: ((emacs "29") (emacsql "3.1.1"))), the dependency is not actually updated unless you run package-update-all.

Also emacsql-sqlite-reserved is defined in emacsql.el.

Side note: I am right now working to improve how EmacSQL is packaged and I plan to soon work on improving the version string format used by Melpa.

@Trevoke
Copy link
Author

Trevoke commented Feb 17, 2023

Okay. No worries. I didn't realize org-roam was operating so far on the bleeding edge and I need my emacs to work, so I'm downgrading back to emacs 28 for now. Sorry about the hassle.

@Trevoke Trevoke closed this as completed Feb 17, 2023
@tarsius
Copy link
Member

tarsius commented Feb 17, 2023

The problem isn't that Emacs 29.0.60 doesn't work but that emacsql is outdated. (The issue with the format of Melpa snapshot version strings also isn't specific to Emacs 29 release; it's completely unrelated to the Emacs version being used.)

But if I were you I would wait a week or two. As I said I am currently working to change how EmacSQL is packaged. In the future it won't be split into multiple packages. Once that is the case, internal dependencies are guaranteed to be up-to-date.

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