branch: externals/gnosis
commit 35d74794d0277423eabaae0fa8844d0c452d1c11
Author: Thanos Apollo <[email protected]>
Commit: Thanos Apollo <[email protected]>

    [fix] require emacsql-sqlite-builtin to fix cl-generic dispatch.
    
    On Emacs 29+ with builtin sqlite, emacsql-sqlite-open lazily autoloads
    emacsql-sqlite-builtin which defines specialized cl-generic methods
    for emacsql.
    
    When the first emacsql call happens in the same form as the connection
    open, the generic dispatcher may use the stale base-class method which
    calls process-buffer on a non-process connection, causing
    wrong-type-argument errors.
    
    Pre-loading the builtin backend ensures its methods are registered
    before any emacsql call.  The require is soft
    (nil t) so it's a no-op on Emacs < 29 without builtin sqlite.
---
 gnosis.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnosis.el b/gnosis.el
index 8b036f0c1a..8c0264b8e4 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -42,6 +42,7 @@
 
 (require 'vc-git)
 (require 'emacsql-sqlite)
+(require 'emacsql-sqlite-builtin nil t)
 (require 'transient)
 (require 'animate)
 

Reply via email to