unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lennart Vogelsang <lennart@vogelsang.berlin>
Cc: 63590@debbugs.gnu.org
Subject: bug#63590: 29.0.90; can't load sqlite extension
Date: Sat, 20 May 2023 15:35:17 +0300	[thread overview]
Message-ID: <83jzx3rxiy.fsf@gnu.org> (raw)
In-Reply-To: <99178a26-7148-f4e0-76de-bf2e3bec98af@vogelsang.berlin> (message from Lennart Vogelsang on Sat, 20 May 2023 12:39:37 +0200)

> Date: Sat, 20 May 2023 12:39:37 +0200
> From: Lennart Vogelsang <lennart@vogelsang.berlin>
> Cc: 63590@debbugs.gnu.org
> 
> Ahh, I just wanted to answer you, I just noticed that about the tests 
> too. Thank you! Your patch works for me,

Thanks for testing, I will install the changes soon.

> just one small thing: sqlite extension loading can also fail because of 
> other reasons (e.g. if the shared library
> does not exist). Currently your patch would leave sqlite extension 
> loading enabled in that case, I think?

Right, fixed.

> I would also argue that it would make sense to actually report the error 
> of the extension loading (when  the dynamic library file does not exist, 
> or the extension is invalid). Maybe something like this:

I don't want to change the API in such a drastic way, especially as we
are close to releasing Emacs 29.1.  It is easy for the caller to test
whether the file exists or not, and it isn't clear to me that every
caller would like the primitive to signal an error.  The return value
is enough to know whether the extension can be used or not, so every
caller can do what they need, and no important information is lost.

> That way, the test also correctly fails as we signal the error from the 
> extension loading.

I've modified the test to check the existence of the file instead.
Doing that is actually better, since on many systems the extensions
will not be installed, or installed not in the directories whose names
are used by the test, and it is important to make sure the return
value of sqlite-load-extension corresponds to whether the file is in
that place or not.

> Just out of curiosity, as there are a handful of useful 
> sqlite extensions out there, could there be a way to make the allow list 
> a bit more lenient?

I had the same thoughts, so I added some of them, which I thought
could be useful for Emacs.

> Maybe as a build configure feature allowing us to specify other
> extensions that are allowed to be loaded.

That is less desirable, since in many cases the person who builds
Emacs is some downstream distro maintainer, who doesn't know which
extensions will be useful for the end-users.





  reply	other threads:[~2023-05-20 12:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-19 13:25 bug#63590: 29.0.90; can't load sqlite extension Lennart Vogelsang via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-19 16:36 ` Eli Zaretskii
2023-05-20  9:53   ` Eli Zaretskii
2023-05-20  9:59 ` Eli Zaretskii
2023-05-20 10:39   ` Lennart Vogelsang via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-20 12:35     ` Eli Zaretskii [this message]
2023-05-20 12:45       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83jzx3rxiy.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=63590@debbugs.gnu.org \
    --cc=lennart@vogelsang.berlin \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).