From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63590: 29.0.90; can't load sqlite extension Date: Sat, 20 May 2023 15:35:17 +0300 Message-ID: <83jzx3rxiy.fsf@gnu.org> References: <2a8d4ca6-1fdf-98c7-6d4b-01f9cca30e8b@vogelsang.berlin> <83mt1zs4qz.fsf@gnu.org> <99178a26-7148-f4e0-76de-bf2e3bec98af@vogelsang.berlin> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22801"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63590@debbugs.gnu.org To: Lennart Vogelsang Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 20 14:36:17 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q0Lol-0005ff-I8 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 May 2023 14:36:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q0Loa-0006rr-R1; Sat, 20 May 2023 08:36:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q0LoZ-0006ri-3Y for bug-gnu-emacs@gnu.org; Sat, 20 May 2023 08:36:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q0LoY-0003pq-SL for bug-gnu-emacs@gnu.org; Sat, 20 May 2023 08:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q0LoY-0005ZJ-AM for bug-gnu-emacs@gnu.org; Sat, 20 May 2023 08:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 May 2023 12:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63590 X-GNU-PR-Package: emacs Original-Received: via spool by 63590-submit@debbugs.gnu.org id=B63590.168458611521348 (code B ref 63590); Sat, 20 May 2023 12:36:02 +0000 Original-Received: (at 63590) by debbugs.gnu.org; 20 May 2023 12:35:15 +0000 Original-Received: from localhost ([127.0.0.1]:57991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0Lni-0005YB-91 for submit@debbugs.gnu.org; Sat, 20 May 2023 08:35:15 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q0Lne-0005XV-3H for 63590@debbugs.gnu.org; Sat, 20 May 2023 08:35:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q0LnY-0003R2-7O; Sat, 20 May 2023 08:35:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=kRR4mUIoRzkYjQLQuiKLD2Ii16tLJTEED7m63gdKs88=; b=gqGcelpv5VkSeh70kzvD uT1n92bRv1thHmErteezT8BnmkLGfwrl5kBWIRcGdirmLNeWvXBmHRPUF4LI+HTs0TH66AnlcyO22 /9JdijoF+g7vn3LF/pGfG+6bdybAwtFj1Em99MX364oo7OwW4CdKgkm4Md+BAO2PDYbb3ZKQvZ3aj gioAvu+5SmHJRM6lfebgA5kvG8QesvuA7aS7dhnN1IEV/2XZAvq9iD27evzfAAek2f1qZQMTW90ij v12/L/qyJC069Ud3lCHvlYlL5ZCd4S8yj4n/BljZr1DtOekg860+A3yJhJofOsBbT59M0QUuOBVDZ PSI+551g5oUKtQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q0LnX-00059S-NZ; Sat, 20 May 2023 08:35:00 -0400 In-Reply-To: <99178a26-7148-f4e0-76de-bf2e3bec98af@vogelsang.berlin> (message from Lennart Vogelsang on Sat, 20 May 2023 12:39:37 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262054 Archived-At: > Date: Sat, 20 May 2023 12:39:37 +0200 > From: Lennart Vogelsang > 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.