emacsql-sqlite-builtin: Fix declare-functions#130
Merged
tarsius merged 2 commits intomagit:mainfrom Mar 20, 2025
Merged
Conversation
All three sqlite-* functions used are defined in src/sqlite.c, not lisp/sqlite.el, which defines only the macro with-sqlite-transaction.
This lisp library only defines a macro that we do not use. The actual built-in SQLite support does not have to loaded explicitly. Re magit#130.
Member
|
Thanks! Requiring |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All three
sqlite-*functions used are defined insrc/sqlite.c, notlisp/sqlite.el, which defines only the macrowith-sqlite-transaction.BTW, I'm curious: what is the reasoning behind having
(require 'sqlite)and(require 'sqlite nil t)inemacsql-sqlite-builtin.el?I see that
emacsql-sqlite.elcheckssqlite-available-pbefore loadingemacsql-sqlite-builtin.el. This handles cases like Emacs 29+ without SQLite support, in which casesqlite.elexists butsqlite-openetc. are not defined, and cases on Windows wheresqlite-openetc. were defined at compile time, but the SQLite library is not found at run time.So at first glance the
(require (quote sqlite))inemacsql-sqlite-builtin.elseems to me equivalent to signalling an error on Emacs < 29, regardless of SQLite support. Is that the intention, or is there some other thinking behind it?Also,
(require 'sqlite nil t)doesn't currently do anything (since EmacSQL doesn't usewith-sqlite-transaction). Is therequirethere for less typing down the road, when more things are added tosqlite.el? Or is there some other thinking here as well?Thanks!