Subject: bug#72788: 30.0.50; multisession--ensure-db: Symbol’s function definition is void: sqlite-open [2 times]

From: Eli Zaretskii <[email-masked]>
Date: Sat, 31 Aug 2024 13:27:59 +0300

> Date: Mon, 26 Aug 2024 10:57:43 +0300
> From: Jean Louis <[email-masked]>
> Cc: [email-masked]
> 
> * Eli Zaretskii <[email-masked]> [2024-08-25 08:38]:
> > Did you customize multisession-storage to the value 'sqlite?  The
> > default is 'files.  You cannot customize it to use 'sqlite if your
> > Emacs doesn't have sqlite support (as it seems to be the case).
> 
> Yes, it was customized that way. When I changed the operating system,
> then the sqlite development library was not there.
> 
> But if Emacs is trying to use sqlite functions, then it would be
> better that program verifies if sqlite functions are there, and then
> use default "files" as option.
> 
> I have now compiled it with development libraries and it works again.

Stefan, do we have a way of causing the cl-defmethod dispatch reject a
method due to a failed predicate?  The relevant method of
multisession.el says:

  (cl-defmethod multisession-backend-value ((_type (eql 'sqlite)) object)

How can I modify this (or its callers?) to make this implementation be
called only if sqlite-available-p returns non-nil?

Btw, it looks like it's okay to have cl-defmethod without a
cl-defgeneric for the same method?  is that expected?